Skip to content

Commit

Permalink
PHPStan update
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jan 20, 2019
1 parent 4e2b076 commit a13d35e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,13 @@ matrix:

install:
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint ^1.0
- travis_retry composer create-project --no-interaction xificurk/phpstan-shim /tmp/phpstan ^0.10
- travis_retry composer update --no-interaction --prefer-dist $COMPOSER_ARGS

script:
- /tmp/php-parallel-lint/parallel-lint -e php,phpt --exclude tests/temp src tests
- vendor/bin/tester -s -p php -c tests/php.ini tests
- /tmp/phpstan/phpstan.phar analyse -c tests/phpstan.neon -l max src
- /tmp/phpstan/phpstan.phar analyse -c tests/phpstan.tests.neon -l max tests
- vendor/bin/phpstan.phar analyse -c tests/phpstan.neon -l max src
- vendor/bin/phpstan.phar analyse -c tests/phpstan.tests.neon -l max tests

after_failure:
- for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
},
"require-dev": {
"nette/tester": "^2.1",
"xificurk/phpstan-shim": "^0.11",
"nette/bootstrap": "^2.4.1@dev || ^3.0@dev",
"nette/di": "^2.4.7@dev",
"latte/latte": "^2.4@dev",
Expand Down
1 change: 1 addition & 0 deletions src/Bridges/TexyLatte/TexyModeMacro.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function finalize(): array
* New node is found. Returns FALSE to reject.
*
* @param MacroNode $node
* @throws Latte\CompileException
*/
public function nodeOpened(MacroNode $node): void
{
Expand Down
12 changes: 9 additions & 3 deletions tests/phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ includes:

parameters:
exceptionRules:
checkedExceptions:
- RuntimeException
ignoredExceptions:
uncheckedExceptions:
- LogicException
- Nette\InvalidStateException

ignoreErrors:
-
message: '#PHPDoc tag @throws with type Latte\\CompileException is not compatible with parent#' # intended
path: %currentWorkingDirectory%/src/Bridges/TexyLatte/TexyModeMacro.php
-
message: '#Return type \(void\) of method Nepada\\Bridges\\TexyLatte\\TexyModeMacro::nodeOpened\(\) should be compatible#' # intended
path: %currentWorkingDirectory%/src/Bridges/TexyLatte/TexyModeMacro.php

0 comments on commit a13d35e

Please sign in to comment.