fix: #10496 #10503 #12399
Annotations
7 errors
Run Psalm:
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php#L550
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php:550:5: InvalidDocblock: array<value-of<self::SUPER_GLOBALS>|'$_FILES full path'|'$argv'|'$argc', Union> is not a valid type (Invalid array key type value-of<self::SUPER_GLOBALS> in /home/runner/work/psalm/psalm/src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php:549) (see https://psalm.dev/008)
|
Run Psalm:
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php#L552
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php:552:98: MixedInferredReturnType: Could not verify return type 'Psalm\Type\Union' for Psalm\Internal\Analyzer\Statements\Expression\Fetch\VariableFetchAnalyzer::getGlobalType (see https://psalm.dev/047)
|
Run Psalm:
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php#L577
src/Psalm/Internal/Analyzer/Statements/Expression/Fetch/VariableFetchAnalyzer.php:577:20: MixedReturnStatement: Could not infer a return type (see https://psalm.dev/138)
|
Run Psalm:
src/Psalm/Internal/Type/TypeParser.php#L666
src/Psalm/Internal/Type/TypeParser.php:666:57: ArgumentTypeCoercion: Argument 1 of Psalm\Type\MutableUnion::setTypes expects non-empty-array<array-key, Psalm\Type\Atomic>, but parent type array<array-key, Psalm\Type\Atomic> provided (see https://psalm.dev/193)
|
Run Psalm:
tests/AnnotationTest.php#L1354
tests/AnnotationTest.php:1354:49: InvalidReturnType: The declared return type 'iterable<string, array{code: string, error_levels?: list<string>, error_message: string, ignored_issues?: list<string>, php_version?: string}>' for Psalm\Tests\AnnotationTest::providerInvalidCodeParse is incorrect, got 'array{DuplicatedParam: array{code: '<?php\n /**\n * @psalm-param array $arr\n...', error_message: non-falsy-string}, DuplicatedReturn: array{code: '<?php\n /**\n * @return void\n ...', error_message: non-falsy-string}, alwaysCheckReturnType: array{code: '<?php\n class A {}\n\n /**\n ...', error_message: 'UndefinedClass'}, badAmpersand: array{code: '<?php\n /** @return &array */\n function f...', error_message: 'InvalidDocblock'}, badCallableVar: array{code: '<?php\n /** @return Closure(int): */\n fun...', error_message: 'InvalidDocblock'}, badPsalmType: array{code: '<?php\n /**\n * @psalm-type Foo = array{a...', error_message: 'InvalidDocblock'}, badStringVar: array{code: '<?php\n /** @var string; */\n $a = \"hello\";', error_message: 'InvalidDocblock'}, badVar: array{code: '<?php\n /** @var Foo */\n $a = $_GET[\"foo\"];', error_message: 'UndefinedDocblockClass'}, badlyFormattedVar: array{code: '<?php\n /**\n * @return string[]\n ...', error_message: 'InvalidDocblock'}, badlyWrittenVar: array{code: '<?php\n /** @param mixed $x */\n function ...', error_message: 'MissingDocblockType'}, canNeverReturnDeclaredType: array{code: '<?php\n\n /** @psalm-return false */\n fun...', error_message: non-falsy-string}, dontOverrideSameType: array{code: '<?php\n class A {\n /** @return ?int *...', error_message: 'InvalidReturnType'}, doubleBar: array{code: '<?php\n /** @param PDO||Closure|numeric $a */\n ...', error_message: 'InvalidDocblock'}, emptyParentheses: array{code: '<?php\n /** @return () */\n function f() {...', error_message: 'InvalidDocblock'}, falsableWithExpectedTypeTrue: array{code: '<?php\n\n /** @psalm-return true */\n func...', error_message: non-falsy-string}, hyphenInType: array{code: '<?php\n /**\n * @return - Description\n ...', error_message: 'InvalidDocblock'}, identifyReturnType: array{code: '<?php\n /** @return array{hello: string} */\n ...', error_message: non-falsy-string}, incorrectDocblockOrder: array{code: '<?php\n class MyClass {\n /**\n ...', error_message: 'MissingDocblockType'}, intParamTypeDefinedInParent: array{code: '<?php\n class A {\n public function fo...', error_message: 'MissingParamType', ignored_issues: list{'MethodSignatureMismatch'}}, invalidArrayKeyType: array{code: '<?php\n /**\n * @param array<float, strin...', error_message: 'InvalidDocblock'}, invalidClassMethodReturn: array{code: '<?php\n class C {\n /**\n ...', error_message: 'MissingDocblockType'}, invalidClassMethodReturnBrackets: array{code: '<?php\n class C {\n /**\n ...', error_message: 'InvalidDocblock'}, invalidDocblockReturn: array{code: '<?php\n /**\n * @return string\n ...', error_message: 'MismatchingDocblockReturnType'}, invalidInterfaceMethodReturn: array{code: '<?php\n interface I {\n /**\n ...', error_message: 'MissingDocblockType'}, i
|
Run Psalm:
tests/AnnotationTest.php#L1356
tests/AnnotationTest.php:1356:16: InvalidReturnStatement: The inferred type 'array{DuplicatedParam: array{code: '<?php\n /**\n * @psalm-param array $arr\n...', error_message: non-falsy-string}, DuplicatedReturn: array{code: '<?php\n /**\n * @return void\n ...', error_message: non-falsy-string}, alwaysCheckReturnType: array{code: '<?php\n class A {}\n\n /**\n ...', error_message: 'UndefinedClass'}, badAmpersand: array{code: '<?php\n /** @return &array */\n function f...', error_message: 'InvalidDocblock'}, badCallableVar: array{code: '<?php\n /** @return Closure(int): */\n fun...', error_message: 'InvalidDocblock'}, badPsalmType: array{code: '<?php\n /**\n * @psalm-type Foo = array{a...', error_message: 'InvalidDocblock'}, badStringVar: array{code: '<?php\n /** @var string; */\n $a = \"hello\";', error_message: 'InvalidDocblock'}, badVar: array{code: '<?php\n /** @var Foo */\n $a = $_GET[\"foo\"];', error_message: 'UndefinedDocblockClass'}, badlyFormattedVar: array{code: '<?php\n /**\n * @return string[]\n ...', error_message: 'InvalidDocblock'}, badlyWrittenVar: array{code: '<?php\n /** @param mixed $x */\n function ...', error_message: 'MissingDocblockType'}, canNeverReturnDeclaredType: array{code: '<?php\n\n /** @psalm-return false */\n fun...', error_message: non-falsy-string}, dontOverrideSameType: array{code: '<?php\n class A {\n /** @return ?int *...', error_message: 'InvalidReturnType'}, doubleBar: array{code: '<?php\n /** @param PDO||Closure|numeric $a */\n ...', error_message: 'InvalidDocblock'}, emptyParentheses: array{code: '<?php\n /** @return () */\n function f() {...', error_message: 'InvalidDocblock'}, falsableWithExpectedTypeTrue: array{code: '<?php\n\n /** @psalm-return true */\n func...', error_message: non-falsy-string}, hyphenInType: array{code: '<?php\n /**\n * @return - Description\n ...', error_message: 'InvalidDocblock'}, identifyReturnType: array{code: '<?php\n /** @return array{hello: string} */\n ...', error_message: non-falsy-string}, incorrectDocblockOrder: array{code: '<?php\n class MyClass {\n /**\n ...', error_message: 'MissingDocblockType'}, intParamTypeDefinedInParent: array{code: '<?php\n class A {\n public function fo...', error_message: 'MissingParamType', ignored_issues: list{'MethodSignatureMismatch'}}, invalidArrayKeyType: array{code: '<?php\n /**\n * @param array<float, strin...', error_message: 'InvalidDocblock'}, invalidClassMethodReturn: array{code: '<?php\n class C {\n /**\n ...', error_message: 'MissingDocblockType'}, invalidClassMethodReturnBrackets: array{code: '<?php\n class C {\n /**\n ...', error_message: 'InvalidDocblock'}, invalidDocblockReturn: array{code: '<?php\n /**\n * @return string\n ...', error_message: 'MismatchingDocblockReturnType'}, invalidInterfaceMethodReturn: array{code: '<?php\n interface I {\n /**\n ...', error_message: 'MissingDocblockType'}, invalidInterfaceMethodReturnBrackets: array{code: '<?php\n interface I {\n /**\n ...', error_message: 'InvalidDocblock'}, invalidParamDocblockAsterisk: array{code: '<?php\n
|
Run Psalm
Process completed with exit code 2.
|
The logs for this run have expired and are no longer available.
Loading