Skip to content

Fix missing detection of dead code in expressions #21735

Fix missing detection of dead code in expressions

Fix missing detection of dead code in expressions #21735

Triggered via pull request July 17, 2025 12:31
Status Cancelled
Total duration 5m 35s
Artifacts

static-analysis.yml

on: pull_request
Generate baseline
1m 41s
Generate baseline
Generate PHP baseline
1m 41s
Generate PHP baseline
Matrix: PHPStan with result cache
Matrix: PHPStan
Fit to window
Zoom out
Zoom in

Annotations

138 errors
PHPStan with result cache (8.3): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan with result cache (8.3): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan with result cache (8.3): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan with result cache (8.3): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan with result cache (8.4): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan with result cache (8.4): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan with result cache (8.4): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan with result cache (8.4): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
Generate PHP baseline
Process completed with exit code 2.
Generate PHP baseline: src/Type/Php/MbStrlenFunctionReturnTypeExtension.php#L0
Ignored error pattern #^Strict comparison using \=\=\= between int<0, max> and false will always evaluate to false\.$# in path /home/runner/work/phpstan-src/phpstan-src/src/Type/Php/MbStrlenFunctionReturnTypeExtension.php was not matched in reported errors.
PHPStan (8.2, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.2, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.2, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.2, ubuntu-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
Generate baseline
Process completed with exit code 1.
PHPStan (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.4, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.4, ubuntu-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan with result cache (8.2): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan with result cache (8.2): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan with result cache (8.2): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan with result cache (8.2): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.3, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.3, ubuntu-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.1, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.1, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.1, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.1, ubuntu-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.0, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2853
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.0, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2852
Empty array passed to foreach.
PHPStan (8.0, ubuntu-latest): src/Analyser/NodeScopeResolver.php#L2838
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.0, ubuntu-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.3, windows-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.3, windows-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.3, windows-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.3, windows-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.2, windows-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.2, windows-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.2, windows-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.2, windows-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.4, windows-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.4, windows-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.4, windows-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.4, windows-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.0, windows-latest): src/Analyser/NodeScopeResolver.php#L2853
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.0, windows-latest): src/Analyser/NodeScopeResolver.php#L2852
Empty array passed to foreach.
PHPStan (8.0, windows-latest): src/Analyser/NodeScopeResolver.php#L2838
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.0, windows-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (8.1, windows-latest): src/Analyser/NodeScopeResolver.php#L2779
Call to function in_array() with arguments *NEVER*, array{} and true will always evaluate to false.
PHPStan (8.1, windows-latest): src/Analyser/NodeScopeResolver.php#L2778
Empty array passed to foreach.
PHPStan (8.1, windows-latest): src/Analyser/NodeScopeResolver.php#L2764
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L4971
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L3912
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L3062
Unused PHPStan\Analyser\MutatingScope::enterTrait
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L2836
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L2810
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L1990
Unreachable statement - code above always terminates.
PHPStan (8.1, windows-latest): src/Analyser/MutatingScope.php#L218
Property PHPStan\Analyser\MutatingScope::$constantResolver is never read, only written.
PHPStan (7.4, windows-latest)
The operation was canceled.
PHPStan (7.4, windows-latest)
Canceling since a higher priority waiting request for sa-bug13232 exists
PHPStan (7.4, ubuntu-latest)
The operation was canceled.
PHPStan (7.4, ubuntu-latest)
Canceling since a higher priority waiting request for sa-bug13232 exists
Static Analysis
Canceling since a higher priority waiting request for sa-bug13232 exists