Skip to content

Fixed MethodReflection::createFromMethodName() static analysis issues #94

Fixed MethodReflection::createFromMethodName() static analysis issues

Fixed MethodReflection::createFromMethodName() static analysis issues #94

Triggered via push February 8, 2024 08:16
Status Failure
Total duration 1m 56s
Artifacts
Matrix: composer-normalize
Matrix: composer-validate
Matrix: infection
Matrix: php-cs-fixer
Matrix: psalm
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

8 errors and 21 warnings
php-cs-fixer (8.1)
Process completed with exit code 1.
MixedInferredReturnType: src/PhpParserReflector/ContextualPhpParserReflector.php#L163
src/PhpParserReflector/ContextualPhpParserReflector.php:163:16: MixedInferredReturnType: Could not verify return type 'int' for Typhoon\Reflection\PhpParserReflector\ContextualPhpParserReflector::reflectClassModifiers (see https://psalm.dev/047)
MixedAssignment: src/PhpParserReflector/ContextualPhpParserReflector.php#L179
src/PhpParserReflector/ContextualPhpParserReflector.php:179:13: MixedAssignment: Unable to determine the type that $modifiers is being assigned to (see https://psalm.dev/032)
MixedOperand: src/PhpParserReflector/ContextualPhpParserReflector.php#L179
src/PhpParserReflector/ContextualPhpParserReflector.php:179:27: MixedOperand: Right operand cannot be mixed (see https://psalm.dev/059)
MixedReturnStatement: src/PhpParserReflector/ContextualPhpParserReflector.php#L182
src/PhpParserReflector/ContextualPhpParserReflector.php:182:16: MixedReturnStatement: Possibly-mixed return value (see https://psalm.dev/138)
MixedReturnStatement: src/PhpParserReflector/ContextualPhpParserReflector.php#L182
src/PhpParserReflector/ContextualPhpParserReflector.php:182:16: MixedReturnStatement: Could not infer a return type (see https://psalm.dev/138)
psalm (8.1)
Process completed with exit code 2.
psalm (8.3)
The operation was canceled.
test (8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
test (8.2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
php-cs-fixer (8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
php-cs-fixer (8.1): src/PhpParserReflector/ContextualPhpParserReflector.php#L1
Found violation(s) of type: native_function_invocation
php-cs-fixer (8.1): src/PhpParserReflector/ContextualPhpParserReflector.php#L1
Found violation(s) of type: concat_space
test (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
composer-normalize (8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
psalm (8.2)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
psalm (8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
psalm (8.3)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
infection (8.1)
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
infection (8.1): src/ClassReflection.php#L55
Escaped Mutant for Mutator "MatchArmRemoval": --- Original +++ New @@ @@ { return match ($name) { 'name' => $this->metadata->name, - default => new \OutOfBoundsException(sprintf('Property %s::$%s does not exist.', self::class, $name)), }; } public function __isset(string $name) : bool
infection (8.1): src/ClassReflection.php#L78
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ * @param class-string<TClass>|null $name * @return ($name is null ? list<AttributeReflection<object>> : list<AttributeReflection<TClass>>) */ - public function getAttributes(?string $name = null, int $flags = 0) : array + public function getAttributes(?string $name = null, int $flags = -1) : array { if ($this->attributes === null) { $class = $this->metadata->name;
infection (8.1): src/ClassReflection.php#L78
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ * @param class-string<TClass>|null $name * @return ($name is null ? list<AttributeReflection<object>> : list<AttributeReflection<TClass>>) */ - public function getAttributes(?string $name = null, int $flags = 0) : array + public function getAttributes(?string $name = null, int $flags = 1) : array { if ($this->attributes === null) { $class = $this->metadata->name;
infection (8.1): src/ClassReflection.php#L101
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function getConstants(?int $filter = null) : array { - $this->loadNative(); + return parent::getConstants($filter); } public function getConstructor() : ?MethodReflection
infection (8.1): src/ClassReflection.php#L113
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ } public function getDefaultProperties() : array { - $this->loadNative(); + return parent::getDefaultProperties(); } public function getDocComment() : string|false
infection (8.1): src/ClassReflection.php#L191
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ */ public function getMethods(?int $filter = null) : array { - if ($filter === null || $filter === 0) { + if ($filter === null || $filter === -1) { return array_values($this->getResolvedMethods()); } return array_values(array_filter($this->getResolvedMethods(), static fn(MethodReflection $method): bool => ($filter & $method->getModifiers()) !== 0));
infection (8.1): src/ClassReflection.php#L192
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ public function getMethods(?int $filter = null) : array { if ($filter === null || $filter === 0) { - return array_values($this->getResolvedMethods()); + return $this->getResolvedMethods(); } return array_values(array_filter($this->getResolvedMethods(), static fn(MethodReflection $method): bool => ($filter & $method->getModifiers()) !== 0)); }
infection (8.1): src/ClassReflection.php#L195
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ if ($filter === null || $filter === 0) { return array_values($this->getResolvedMethods()); } - return array_values(array_filter($this->getResolvedMethods(), static fn(MethodReflection $method): bool => ($filter & $method->getModifiers()) !== 0)); + return array_filter($this->getResolvedMethods(), static fn(MethodReflection $method): bool => ($filter & $method->getModifiers()) !== 0); } public function getModifiers() : int {
infection (8.1): src/ClassReflection.php#L264
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ */ public function getProperties(?int $filter = null) : array { - if ($filter === null || $filter === 0) { + if ($filter === null || $filter === -1) { return array_values($this->getResolvedProperties()); } return array_values(array_filter($this->getResolvedProperties(), static fn(PropertyReflection $property): bool => ($filter & $property->getModifiers()) !== 0));
infection (8.1): src/ClassReflection.php#L265
Escaped Mutant for Mutator "UnwrapArrayValues": --- Original +++ New @@ @@ public function getProperties(?int $filter = null) : array { if ($filter === null || $filter === 0) { - return array_values($this->getResolvedProperties()); + return $this->getResolvedProperties(); } return array_values(array_filter($this->getResolvedProperties(), static fn(PropertyReflection $property): bool => ($filter & $property->getModifiers()) !== 0)); }