Skip to content

Add AttributeTypecastHandler #32

Add AttributeTypecastHandler

Add AttributeTypecastHandler #32

Triggered via pull request June 17, 2024 12:20
@vjikvjik
synchronize #5
attrs
Status Success
Total duration 35s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation
Fit to window
Zoom out
Zoom in

Annotations

3 warnings
PHP 8.1-ubuntu-latest
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
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(); }
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 {