Skip to content

Early version of using PHPStan for parsing. #2092

Early version of using PHPStan for parsing.

Early version of using PHPStan for parsing. #2092

Triggered via pull request March 10, 2024 08:27
Status Failure
Total duration 32s
Artifacts

static-analysis.yml

on: pull_request
Matrix: Coding Standards
Matrix: Static Code Analysis by PHPStan
Matrix: Static Code Analysis by Psalm
Fit to window
Zoom out
Zoom in

Annotations

15 errors and 7 warnings
RedundantCondition: src/Core/Ast/Parser/Extractors/ClassMethodExtractor.php#L115
src/Core/Ast/Parser/Extractors/ClassMethodExtractor.php:115:18: RedundantCondition: Type array<array-key, string> for $<tmp coalesce var>4218 is never null (see https://psalm.dev/122)
TypeDoesNotContainNull: src/Core/Ast/Parser/Extractors/ClassMethodExtractor.php#L115
src/Core/Ast/Parser/Extractors/ClassMethodExtractor.php:115:89: TypeDoesNotContainNull: Cannot resolve types for $<tmp coalesce var>4218 - array<array-key, string> does not contain null (see https://psalm.dev/090)
PossiblyNullReference: src/Core/Ast/Parser/Extractors/PropertyExtractor.php#L93
src/Core/Ast/Parser/Extractors/PropertyExtractor.php:93:23: PossiblyNullReference: Cannot call method getName on possibly null value (see https://psalm.dev/083)
PossiblyNullReference: src/Core/Ast/Parser/Extractors/PropertyExtractor.php#L95
src/Core/Ast/Parser/Extractors/PropertyExtractor.php:95:23: PossiblyNullReference: Cannot call method getName on possibly null value (see https://psalm.dev/083)
PossiblyNullReference: src/Core/Ast/Parser/Extractors/VariableExtractor.php#L84
src/Core/Ast/Parser/Extractors/VariableExtractor.php:84:23: PossiblyNullReference: Cannot call method getName on possibly null value (see https://psalm.dev/083)
PossiblyNullReference: src/Core/Ast/Parser/Extractors/VariableExtractor.php#L86
src/Core/Ast/Parser/Extractors/VariableExtractor.php:86:23: PossiblyNullReference: Cannot call method getName on possibly null value (see https://psalm.dev/083)
RiskyTruthyFalsyComparison: src/Core/Ast/Parser/NikicPhpParser/TypeScope.php#L18
src/Core/Ast/Parser/NikicPhpParser/TypeScope.php:18:21: RiskyTruthyFalsyComparison: Operand of type null|string contains type string, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
NamedArgumentNotAllowed: src/Core/Ast/Parser/PhpStanParser/PhpStanTypeResolver.php#L31
src/Core/Ast/Parser/PhpStanParser/PhpStanTypeResolver.php:31:93: NamedArgumentNotAllowed: Method array_merge called with named unpacked array array<array-key, list<string>> (array with string keys) (see https://psalm.dev/268)
UnusedBaselineEntry: src/Core/Ast/Parser/TypeScope.php#L1
src/Core/Ast/Parser/TypeScope.php:0:0: UnusedBaselineEntry: Baseline for issue "RiskyTruthyFalsyComparison" has 1 extra entry. (see https://psalm.dev/316)
Static Code Analysis by Psalm (ubuntu-22.04, 8.1)
Process completed with exit code 2.
Coding Standards (ubuntu-22.04, 8.1)
Process completed with exit code 2.
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1): src/Core/Analyser/LayerForTokenAnalyser.php#L1
Ignored error pattern #^Parameter \#1 \$array \(list\<string\>\) of array_values is already a list, call has no effect\.$# in path /home/runner/work/deptrac/deptrac/src/Core/Analyser/LayerForTokenAnalyser.php was not matched in reported errors.
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1): src/Core/Analyser/TokenInLayerAnalyser.php#L1
Ignored error pattern #^Parameter \#1 \$array \(list\<string\>\) of array_values is already a list, call has no effect\.$# in path /home/runner/work/deptrac/deptrac/src/Core/Analyser/TokenInLayerAnalyser.php was not matched in reported errors.
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1): src/Core/Analyser/UnassignedTokenAnalyser.php#L1
Ignored error pattern #^Parameter \#1 \$array \(list\<string\>\) of array_values is already a list, call has no effect\.$# in path /home/runner/work/deptrac/deptrac/src/Core/Analyser/UnassignedTokenAnalyser.php was not matched in reported errors.
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1)
Process completed with exit code 2.
Static Code Analysis by Psalm (ubuntu-22.04, 8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/cache@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Static Code Analysis by Psalm (ubuntu-22.04, 8.1)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions/cache@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Static Code Analysis by Psalm (ubuntu-22.04, 8.1)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Coding Standards (ubuntu-22.04, 8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Coding Standards (ubuntu-22.04, 8.1)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Static Code Analysis by PHPStan (ubuntu-22.04, 8.1)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/