You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
------ ------------------------------------------------
Line tests\View\Helper\FlashMessenger2Test.php
------ ------------------------------------------------
82 Anonymous functionhas an unused use $matcher.
------ ------------------------------------------------
But the variable $matcher is used on lines 85 and 94.
This is my phpstan.neon file:
parameters:
level: maxparallel:
maximumNumberOfProcesses: 1processTimeout: 200.0paths:
- src
- testsscanFiles:
- %currentWorkingDirectory%/vendor/autoload.php- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/autoload.php- %currentWorkingDirectory%/vendor/squizlabs/php_codesniffer/src/Util/Tokens.php# reports occurrences of type-checking functions always evaluated to truecheckAlwaysTrueCheckTypeFunctionCall: false# reports instanceof occurrences always evaluated to truecheckAlwaysTrueInstanceof: true# reports === and !== occurrences always evaluated to truecheckAlwaysTrueStrictComparison: true# enable stricter analysis of benevolent union typescheckBenevolentUnionTypes: true# reports use of dynamic properties as undefinedcheckDynamicProperties: true# reports code paths with missing return statement in functions and methods with @return mixed PHPDoccheckExplicitMixedMissingReturn: true# reports function and method calls with incorrect name casecheckFunctionNameCase: true# it requires type variables always be specified in typehintscheckGenericClassInNonGenericObjectType: true# be strict about values with an unspecified (implicit mixed) typecheckImplicitMixed: true# reports references to built-in classes with incorrect name casecheckInternalClassCaseSensitivity: true# require that callable signatures are specifiedcheckMissingCallableSignature: true# checks for missing typehints in iterablescheckMissingIterableValueType: true# reports return typehints that could be narrowed down because some of the listed types are never returnedcheckTooWideReturnTypesInProtectedAndPublicMethods: true# reports properties with native types that weren’t initialized in the class constructorcheckUninitializedProperties: true# doesn’t require typehints for properties if the types can be inferred from constructor injectioninferPrivatePropertyTypeFromConstructor: false# prevents reading key and value variables set in foreach when iterating over a non-empty arraypolluteScopeWithAlwaysIterableForeach: false# prevents reading variables set in for loop initial statement and while loop condition after the looppolluteScopeWithLoopInitialAssignments: false# report always true last condition in a series of elseif branches and match expression armsreportAlwaysTrueInLastCondition: true# reports violations of parameter type contravariance and return type covariancereportMaybesInMethodSignatures: true# reports violations of property type invariancereportMaybesInPropertyPhpDocTypes: true# reports violations of parameter type contravariance and return type covariance in static methodsreportStaticMethodSignatures: true#reportWrongPhpDocTypeInVarTag: true# differentiate between PHPDoc and native types (if false)treatPhpDocTypesAsCertain: falsetipsOfTheDay: falseexceptions:
implicitThrows: falsecheckedExceptionRegexes:
- '#Exception#'
- '#Throwable#'check:
missingCheckedExceptionInThrows: truetooWideThrowType: true# ignoreErrors:# - '~MockObject~'
The error is reported with PHPStan 1.10.20, but not with 1.10.19.
Code snippet that reproduces the problem
I was not able to reproduce the error with the playground, maybe because of the many dependencies to PHPUnit and the Laminas Framework.
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered:
Bug report
I have this Unittest:
PHPStan 1.10.20 reports this:
But the variable
$matcher
is used on lines 85 and 94.This is my phpstan.neon file:
The error is reported with PHPStan 1.10.20, but not with 1.10.19.
Code snippet that reproduces the problem
I was not able to reproduce the error with the playground, maybe because of the many dependencies to PHPUnit and the Laminas Framework.
Expected output
no error
Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: