Skip to content

Commit

Permalink
Update PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
enumag committed Dec 3, 2017
1 parent 96232a6 commit 4ccb8cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ matrix:

install:
- if [ "$CODING_STANDARD" = "1" ]; then composer require --dev --no-update kdyby/coding-standard:^1.0@dev; fi
- if [ "$PHPSTAN" = "1" ]; then composer require --dev --no-update phpstan/phpstan-shim:^0.7; fi
- if [ "$PHPSTAN" = "1" ]; then composer require --dev --no-update phpstan/phpstan-shim:^0.9; fi
- travis_retry composer update --no-interaction --no-suggest --no-progress --prefer-dist $COMPOSER_EXTRA_ARGS
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint
- if [ "$COVERAGE" != "" ]; then travis_retry wget -O /tmp/coveralls.phar https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar; fi
Expand Down
10 changes: 6 additions & 4 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ parameters:
# Optional arguments
- "#Casting to string something that's already string#"
- "#Casting to int something that's already int#"
- "#Casting to mixed\\[\\] something that's already mixed\\[\\]#"
# https://github.com/phpstan/phpstan/issues/290
- '#Parameter \#2 \$count of method Kdyby\\Translation\\Translator::translate\(\) expects mixed\[\]\|int\|null, int\|null given#'
- '#Parameter \#2 \$count of class Kdyby\\Translation\\Phrase constructor expects mixed\[\]\|int\|null, int\|null given#'
- "#Casting to array something that's already array#"
# Other errors
- '#Access to an undefined property Nette\\Http\\SessionSection\|stdClass::\$locale#'
- '#Argument of an invalid type array\|string\|null supplied for foreach, only iterables are supported#'
- '#Parameter \#1 \$locale of method Symfony\\Component\\Translation\\Translator::setLocale\(\) expects string, string\|null given#'
- '#Array \(array\<Symfony\\Component\\Translation\\Loader\\LoaderInterface\>\) does not accept object#'
4 changes: 2 additions & 2 deletions src/Diagnostics/Panel.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function choiceError($e, $domain)

/**
* @param string|NULL $format
* @param string|NULL $resource
* @param string|array|NULL $resource
* @param string|NULL $locale
* @param string|NULL $domain
*/
Expand All @@ -258,7 +258,7 @@ public function setLocaleWhitelist($whitelist)

/**
* @param string|NULL $format
* @param string|NULL $resource
* @param string|array|NULL $resource
* @param string|NULL $locale
* @param string|NULL $domain
*/
Expand Down

0 comments on commit 4ccb8cb

Please sign in to comment.