Remove unnecessary constants #2320
continuous-integration.yml
on: pull_request
Matrix: Check Backward Compatibility
Matrix: Run benchmarks
Matrix: Check Coding Standards
Matrix: Test Compatibility
Matrix: Check Demo Scripts
Matrix: Mutation tests
Matrix: PHPUnit tests
Matrix: Static Analysis by PHPStan
Matrix: Static Analysis by Psalm
Annotations
15 errors and 8 warnings
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1
Ignored error pattern #Method Roave\\BetterReflection\\Reflection\\ReflectionClass::computeModifiers\(\) never returns \d+ so it can be removed from the return type# in path /home/runner/work/BetterReflection/BetterReflection/src/Reflection/ReflectionClass.php was not matched in reported errors.
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1204
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1204
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1226
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1228
Method Roave\BetterReflection\Reflection\ReflectionClass::computeModifiers() should return 0|16|32|48|64|80|96|112 but returns (float|int).
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest):
test/unit/Reflection/ReflectionClassTest.php#L1311
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.3, ubuntu-latest)
Process completed with exit code 1.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest)
The job was canceled because "locked_8_3_ubuntu-latest" failed.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1
Ignored error pattern #Method Roave\\BetterReflection\\Reflection\\ReflectionClass::computeModifiers\(\) never returns \d+ so it can be removed from the return type# in path /home/runner/work/BetterReflection/BetterReflection/src/Reflection/ReflectionClass.php was not matched in reported errors.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1204
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1204
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1226
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
src/Reflection/ReflectionClass.php#L1228
Method Roave\BetterReflection\Reflection\ReflectionClass::computeModifiers() should return 0|16|32|48|64|80|96|112 but returns (float|int).
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest):
test/unit/Reflection/ReflectionClassTest.php#L1311
Access to undefined constant Roave\BetterReflection\Reflection\Adapter\ReflectionClass::IS_READONLY.
|
Static Analysis by PHPStan (locked, 8.2, ubuntu-latest)
Process completed with exit code 1.
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L372
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
}
/** @psalm-var mixed $nodePropertyArrayItem */
foreach ($nodeProperty as $nodePropertyArrayItem) {
- if ($nodePropertyArrayItem instanceof Node && $this->nodeIsOrContainsYield($nodePropertyArrayItem)) {
+ if (true && $this->nodeIsOrContainsYield($nodePropertyArrayItem)) {
return true;
}
}
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert(true || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert($returnType instanceof Node\Identifier || true || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || true || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || true || $returnType instanceof Node\IntersectionType);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || true);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || false);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|
Mutation tests (locked, 8.3, ubuntu-latest):
src/Reflection/ReflectionFunctionAbstract.php#L508
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation":
--- Original
+++ New
@@ @@
if ($returnType === null) {
return null;
}
- assert($returnType instanceof Node\Identifier || $returnType instanceof Node\Name || $returnType instanceof Node\NullableType || $returnType instanceof Node\UnionType || $returnType instanceof Node\IntersectionType);
+ assert(!$returnType instanceof Node\Identifier || !$returnType instanceof Node\Name || !$returnType instanceof Node\NullableType || !$returnType instanceof Node\UnionType || !$returnType instanceof Node\IntersectionType);
return ReflectionType::createFromNode($this->reflector, $this, $returnType);
}
/** @return list<ReflectionAttribute> */
|