Bump PHP to 8.1 (#8) #38
Annotations
2 warnings
PHP 8.1-ubuntu-latest:
src/AttributeTypecastHandler.php#L45
Escaped Mutant for Mutator "ArrayOneItem":
--- Original
+++ New
@@ @@
unset($rules[$key]);
}
}
- return $rules;
+ return count($rules) > 1 ? array_slice($rules, 0, 1, true) : $rules;
}
public function cast(array $data) : array
{
|
PHP 8.1-ubuntu-latest:
src/AttributeTypecastHandler.php#L31
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($reflection->getProperties() as $property) {
$attributes = $property->getAttributes(TypeInterface::class, ReflectionAttribute::IS_INSTANCEOF);
if (empty($attributes)) {
- continue;
+ break;
}
$this->types[$property->getName()] = $attributes[0]->newInstance();
}
|