phpstan.neon 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. includes:
  2. - dev-tools/vendor/jangregor/phpstan-prophecy/src/extension.neon
  3. - dev-tools/vendor/phpstan/phpstan/conf/bleedingEdge.neon
  4. - dev-tools/vendor/phpstan/phpstan-phpunit/extension.neon
  5. parameters:
  6. level: 5
  7. paths:
  8. - src
  9. - tests
  10. excludes_analyse:
  11. - tests/Fixtures
  12. ignoreErrors:
  13. - '/^Return typehint of method PhpCsFixer\\Tests\\Test\\.+::createIsIdenticalStringConstraint\(\) has invalid type PHPUnit_Framework_Constraint_IsIdentical\.$/'
  14. - '/^Class (Symfony\\Contracts\\EventDispatcher\\Event|Symfony\\Component\\EventDispatcher\\Event) not found.$/'
  15. - '/^Constant T_NAME_(RELATIVE|FULLY_QUALIFIED|QUALIFIED) not found\.$/'
  16. - '/Instantiated class .*TraversableContains is abstract/'
  17. - '/assertInstanceOf\(\) expects class-string.*, string given/'
  18. -
  19. message: '/^Unsafe usage of new static\(\)\.$/'
  20. path: src/Config.php
  21. -
  22. message: '/^Else branch is unreachable because previous condition is always true\.$/'
  23. path: src/Event/Event.php
  24. -
  25. message: '/^Strict comparison using !== between ''@git-commit@'' and ''@git-commit@'' will always evaluate to false\.$/'
  26. path: src/Console/Application.php
  27. -
  28. message: '/^Result of && is always false\.$/'
  29. path: src/Config.php
  30. -
  31. message: '/^Strict comparison using === between false and true will always evaluate to false\.$/'
  32. path: src/Config.php
  33. -
  34. message: '/^Else branch is unreachable because ternary operator condition is always true\.$/'
  35. paths:
  36. - src/Config.php
  37. - src/Tokenizer/Token.php
  38. -
  39. message: '/^Parameter #1 \$fixers of method PhpCsFixer\\Config::registerCustomFixers\(\) expects iterable<PhpCsFixer\\Fixer\\FixerInterface>, string given\.$/'
  40. path: tests/ConfigTest.php
  41. -
  42. message: '/^Parameter #1 \$options of method PhpCsFixer\\FixerConfiguration\\FixerConfigurationResolverRootless::resolve\(\) expects array<string, mixed>, array<int, string> given\.$/'
  43. path: tests/FixerConfiguration/FixerConfigurationResolverRootlessTest.php
  44. -
  45. message: '/^Parameter #1 \$function of function register_shutdown_function expects callable\(\): void, array\(\$this\(PhpCsFixer\\FileRemoval\), ''clean''\) given\.$/'
  46. path: src/FileRemoval.php
  47. -
  48. message: '/^Parameter #1 \$finder of method PhpCsFixer\\Config::setFinder\(\) expects iterable<string>, int given\.$/'
  49. path: tests/ConfigTest.php
  50. - # https://github.com/phpstan/phpstan/issues/1215
  51. message: '/^Strict comparison using === between false and string will always evaluate to false\.$/'
  52. path: src/Fixer/StringNotation/NoTrailingWhitespaceInStringFixer.php
  53. -
  54. message: '/^Property .*::\$indicator .* does not accept null\.$/'
  55. path: tests/Indicator/PhpUnitTestCaseIndicatorTest.php
  56. -
  57. message: '/^Constant T_ATTRIBUTE not found\.$/'
  58. path: src/Tokenizer/Transformer/AttributeTransformer.php
  59. -
  60. message: '/^\$this\(PhpCsFixer\\Tokenizer\\Tokens\) does not accept PhpCsFixer\\Tokenizer\\Token\|null\.$/'
  61. path: src/Tokenizer/Tokens.php
  62. tipsOfTheDay: false