phpstan.neon 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. parameters:
  2. level: 5
  3. autoload_files:
  4. - tests/bootstrap.php
  5. ignoreErrors:
  6. - '#Constructor of class Cake\\[a-zA-Z0-9_\\]+ has an unused parameter#'
  7. - '#Access to undefined constant Memcached::OPT_CLIENT_MODE#'
  8. - '#Access to undefined constant Memcached::DYNAMIC_CLIENT_MODE#'
  9. - '#Access to undefined constant PDO::SQLSRV_ATTR_ENCODING#'
  10. - '#Access to undefined constant PDO::SQLSRV_ENCODING_BINARY#'
  11. - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$webroot#'
  12. - '#Access to an undefined property Psr\\Http\\Message\\UriInterface::\$base#'
  13. - '#Access to an undefined property Exception::\$queryString#'
  14. - '#Access to an undefined property PHPUnit\\Framework\\Test::\$fixtureManager#'
  15. - '#Call to an undefined method Traversable::getArrayCopy().#'
  16. - '#Access to an undefined property Cake\\Mailer\\Renderer::\$request#'
  17. - '#Access to an undefined property Cake\\Mailer\\Renderer::\$response#'
  18. - '#Call to an undefined method Cake\\Auth\\Storage\\StorageInterface::getConfig\(\)#'
  19. - '#Call to an undefined method Cake\\Auth\\Storage\\StorageInterface::setConfig\(\)#'
  20. - '#Variable \$_SESSION in isset\(\) always exists and is not nullable#'
  21. - '#Call to an undefined method Cake\\Chronos\\DifferenceFormatterInterface::dateAgoInWords\(\)#'
  22. - '#Call to an undefined method Cake\\Chronos\\DifferenceFormatterInterface::timeAgoInWords\(\)#'
  23. - '#Return type \(void\) of method Cake\\Shell\\[A-Za-z]+Shell::main\(\) should be compatible with return type \(bool|int|null\) of method Cake\\Console\\Shell::main\(\)#'
  24. - '#Call to an undefined method DateTimeInterface::setTimezone\(\)#'
  25. - '#Parameter \#1 \$it of method AppendIterator::append\(\) expects Iterator, Traversable given.#'
  26. - '#Parameter \#1 \$it of class .+Iterator constructor expects Iterator, Traversable given.#'
  27. - '#Parameter \#1 \$assoc of method Cake\\ORM\\Marshaller::_belongsToMany\(\) expects .+BelongsToMany, Cake\\ORM\\Association given.#'
  28. - '#Parameter \#2 \$assoc of method Cake\\ORM\\Marshaller::_mergeBelongsToMany\(\) expects .+BelongsToMany, Cake\\ORM\\Association given.#'
  29. - '#Parameter \#1 \$table of method Cake\\ORM\\Query::addDefaultTypes\(\) expects Cake\\ORM\\Table, .+RepositoryInterface given.#'
  30. - '#Parameter \#1 \$table of method Cake\\ORM\\Query::_addAssociationsToTypeMap\(\) expects Cake\\ORM\\Table, .+RepositoryInterface given.#'
  31. - '#Property Cake\\Controller\\Controller::\$response \(Cake\\Http\\Response\) does not accept Psr\\Http\\Message\\ResponseInterface#'
  32. - "#Parameter \\#2 \\$callback of function array_filter expects callable\\(mixed, mixed\\): bool, 'strlen' given.#"
  33. - '#Parameter \#1 \$autoload_function of function spl_autoload_register expects#'
  34. - '#Property Cake\\TestSuite\\ConsoleIntegrationTestCase::\$_[a-z]+ \(Cake\\TestSuite\\Stub\\ConsoleOutput\) does not accept null#'
  35. -
  36. message: '#Call to function method_exists\(\) with string and [^ ]+ will always evaluate to false#'
  37. path: 'src/Controller/Component/AuthComponent.php'
  38. -
  39. message: '#Result of && is always false#'
  40. path: 'src/Database/Query.php'
  41. -
  42. message: "#Call to function method_exists\\(\\) with string and 'parseDateTime' will always evaluate to false#"
  43. path: 'src/Database/Type/DateTimeType.php'
  44. -
  45. message: '#Result of && is always false#'
  46. path: 'src/Datasource/QueryCacher.php'
  47. -
  48. message: '#Result of && is always false#'
  49. path: 'src/Routing/Route/EntityRoute.php'
  50. -
  51. message: '#Call to an undefined method Cake\\ORM\\Association::junction\(\).#'
  52. path: 'src/View/Form/EntityContext.php'
  53. -
  54. message: '#Parameter \#1 \$var_array of function extract is passed by reference, so it expects variables only#'
  55. path: 'src/Command/I18nExtractCommand.php'
  56. -
  57. message: '#Result of || is always true#'
  58. path: 'src/Command/I18nExtractCommand.php'
  59. -
  60. message: '#Result of || is always true#'
  61. path: 'src/Utility/Hash.php'
  62. -
  63. message: '#Call to function method_exists\(\) with \*NEVER\* and [^ ]+ will always evaluate to false#'
  64. path: 'src/View/CellTrait.php'
  65. -
  66. message: '#Method Cake\\Utility\\Security::engine\(\) should return Cake\\Utility\\Crypto\\OpenSsl but returns object#'
  67. path: 'src/Utility/Security.php'
  68. -
  69. message: '#Method Cake\\Http\\Middleware\\CspMiddleware::process\(\) should return Psr\\Http\\Message\\ResponseInterface but returns Psr\\Http\\Message\\MessageInterface#'
  70. path: 'src/Http/Middleware/CspMiddleware.php'
  71. -
  72. message: '#Parameter \#1 \$connection of method Cake\\Database\\Schema\\SqlGeneratorInterface::(create|drop|truncate)Sql\(\) expects Cake\\Database\\Connection, Cake\\Datasource\\ConnectionInterface given#'
  73. path: 'src/TestSuite/Fixture/TestFixture.php'
  74. -
  75. message: '#Method Cake\\View\\HelperRegistry::__get\(\) should return Cake\\View\\Helper|null but returns object#'
  76. path: 'src/View/HelperRegistry.php'
  77. -
  78. message: '#Property Cake\\Database\\Driver::\$_connection \(PDO\) does not accept null#'
  79. path: 'src/Database/Driver.php'
  80. -
  81. message: '#If condition is always true#'
  82. paths:
  83. - 'src/Database/Driver/Mysql.php'
  84. - 'src/Database/Driver/Postgres.php'
  85. - 'src/Database/Driver/Sqlite.php'
  86. - 'src/Database/Driver/Sqlserver.php'
  87. -
  88. message: '#Cake\\Database\\Statement\\PDOStatement::__construct\(\) does not call parent constructor from Cake\\Database\\Statement\\StatementDecorator#'
  89. path: 'src/Database/Statement/PDOStatement.php'
  90. -
  91. message: '#Cake\\Database\\Expression\\TupleComparison::__construct\(\) does not call parent constructor from Cake\\Database\\Expression\\Comparison#'
  92. path: 'src/Database/Expression/TupleComparison.php'
  93. -
  94. message: '#Property Cake\\TestSuite\\IntegrationTestCase::\$_[a-zA-z]+ \([a-zA-Z\\]+\) does not accept null#'
  95. path: 'src/TestSuite/IntegrationTestTrait.php'
  96. -
  97. message: '#Property Cake\\TestSuite\\ConsoleIntegrationTestCase::\$_[a-zA-z]+ \([a-zA-Z\\]+\) does not accept null#'
  98. path: 'src/TestSuite/ConsoleIntegrationTestTrait.php'
  99. -
  100. message: '#Negated boolean expression is always false#'
  101. path: 'src/TestSuite/IntegrationTestTrait.php'
  102. -
  103. message: '#Ternary operator condition is always true#'
  104. path: 'src/TestSuite/IntegrationTestTrait.php'
  105. earlyTerminatingMethodCalls:
  106. Cake\Console\Shell:
  107. - abort
  108. services:
  109. -
  110. class: Cake\PHPStan\AssociationTableMixinClassReflectionExtension
  111. tags:
  112. - phpstan.broker.methodsClassReflectionExtension
  113. - phpstan.broker.propertiesClassReflectionExtension