Skip to content

fix: allow docblock for transformer callable type #1113

fix: allow docblock for transformer callable type

fix: allow docblock for transformer callable type #1113

Triggered via push July 19, 2024 14:56
Status Success
Total duration 7m 21s
Artifacts

mutation.yml

on: push
Mutation tests
7m 9s
Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

11 warnings
Mutation tests
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3, actions/cache@v3, actions/cache@v3.2.5. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Mutation tests: src/Cache/ChainCache.php#L109
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ { $saved = true; foreach ($values as $key => $value) { - $saved = $this->set($key, $value, $ttl) && $saved; + $saved = $this->set($key, $value, $ttl) && !$saved; } return $saved; }
Mutation tests: src/Cache/FileSystemCache.php#L133
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ /** @var FilesystemIterator $file */ foreach (new FilesystemIterator($this->cacheDir) as $file) { if ($file->getFilename() === '.valinor.tmp') { - $success = @rmdir($this->cacheDir . DIRECTORY_SEPARATOR . $file->getFilename()) && $success; + $success = @rmdir($this->cacheDir . DIRECTORY_SEPARATOR . $file->getFilename()) || $success; continue; } if (!$file->isFile()) {
Mutation tests: src/Cache/FileSystemCache.php#L149
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ $shouldDeleteRootDir = false; continue; } - $success = @Unlink($this->cacheDir . DIRECTORY_SEPARATOR . $file->getFilename()) && $success; + $success = @Unlink($this->cacheDir . DIRECTORY_SEPARATOR . $file->getFilename()) || $success; } if ($shouldDeleteRootDir) { $success = @rmdir($this->cacheDir) && $success;
Mutation tests: src/Cache/FileSystemCache.php#L183
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ { $deleted = true; foreach ($keys as $key) { - $deleted = $this->delete($key) && $deleted; + $deleted = $this->delete($key) && !$deleted; } return $deleted; }
Mutation tests: src/Definition/Repository/Cache/Compiler/AttributesCompiler.php#L64
Escaped Mutant for Mutator "IfNegation": --- Original +++ New @@ @@ } $argumentsCode = []; foreach ($arguments as $argument) { - if (is_object($argument)) { + if (!is_object($argument)) { $argumentsCode[] = 'unserialize(' . var_export(serialize($argument), true) . ')'; } elseif (is_array($argument)) { $argumentsCode[] = '[' . $this->compileAttributeArguments($argument) . ']';
Mutation tests: src/Definition/Repository/Reflection/ReflectionClassDefinitionRepository.php#L138
Escaped Mutant for Mutator "SpreadRemoval": --- Original +++ New @@ @@ $localAliases = $localTypeAliasResolver->resolveLocalTypeAliases($type); $importedAliases = $importedTypeAliasResolver->resolveImportedTypeAliases($type); $duplicates = []; - $keys = [...array_keys($generics), ...array_keys($localAliases), ...array_keys($importedAliases)]; + $keys = [...array_keys($generics), ...array_keys($localAliases), array_keys($importedAliases)]; foreach ($keys as $key) { $sameKeys = array_filter($keys, fn($value) => $value === $key); if (count($sameKeys) > 1) {
Mutation tests: src/Definition/Repository/Reflection/TypeResolver/ParameterTypeResolver.php#L73
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ foreach ($annotations as $annotation) { $tokens = $annotation->filtered(); $dollarSignKey = array_search('$', $tokens, true); - if ($dollarSignKey === false) { + if ($dollarSignKey === true) { continue; } $parameterName = $tokens[$dollarSignKey + 1] ?? null;
Mutation tests: src/Library/Container.php#L141
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ $builder = new InterfaceNodeBuilder($builder, $this->get(ObjectImplementations::class), $this->get(ClassDefinitionRepository::class), $this->get(ObjectBuilderFactory::class), $this->get(FilteredObjectNodeBuilder::class), new FunctionsContainer($this->get(FunctionDefinitionRepository::class), $settings->customConstructors), $settings->enableFlexibleCasting, $settings->allowSuperfluousKeys); $builder = new CasterProxyNodeBuilder($builder); $builder = new IterableNodeBuilder($builder); - if (count($settings->valueModifier) > 0) { + if (count($settings->valueModifier) >= 0) { $builder = new ValueAlteringNodeBuilder($builder, new FunctionsContainer($this->get(FunctionDefinitionRepository::class), $settings->valueModifier)); } $builder = new StrictNodeBuilder($builder, $settings->allowPermissiveTypes, $settings->enableFlexibleCasting);
Mutation tests: src/Mapper/Object/Argument.php#L79
Escaped Mutant for Mutator "AssignCoalesce": --- Original +++ New @@ @@ } public function attributes() : Attributes { - return $this->attributes ??= Attributes::empty(); + return $this->attributes = Attributes::empty(); } }
Mutation tests: src/Mapper/Object/ArgumentsValues.php#L42
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ public static function forInterface(Arguments $arguments, mixed $value, bool $allowSuperfluousKeys) : self { $self = new self($arguments); - $self->forInterface = true; + $self->forInterface = false; if (count($arguments) > 0) { $self = $self->transform($value, $allowSuperfluousKeys); }