Skip to content

Merge pull request #163 from php-etl/fix/psr-rules #823

Merge pull request #163 from php-etl/fix/psr-rules

Merge pull request #163 from php-etl/fix/psr-rules #823

Triggered via push December 6, 2024 13:52
Status Failure
Total duration 47s
Artifacts

infection.yaml

on: push
infection
37s
infection
Fit to window
Zoom out
Zoom in

Annotations

1 error and 11 warnings
infection
Process completed with exit code 1.
infection
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
infection: src/ExpressionLanguage/Base64Decode.php#L16
Escaped Mutant for Mutator "CastString": --- Original +++ New @@ @@ { public function __construct(string $name) { - parent::__construct($name, fn($value) => sprintf('base64_decode(%s)', $value), fn($value) => base64_decode((string) $value)); + parent::__construct($name, fn($value) => sprintf('base64_decode(%s)', $value), fn($value) => base64_decode($value)); } }
infection: src/ExpressionLanguage/ExpressionLanguage.php#L14
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function __construct(CacheItemPoolInterface $cache = null, array $providers = []) { - parent::__construct($cache, [...$providers, new Provider()]); + parent::__construct($cache, [new Provider()]); } }
infection: src/ExpressionLanguage/ExpressionLanguage.php#L14
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { public function __construct(CacheItemPoolInterface $cache = null, array $providers = []) { - parent::__construct($cache, [...$providers, new Provider()]); + } }
infection: src/ExpressionLanguage/Provider.php#L13
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getFunctions() : array { - return [new Env('env'), new EnvAsFile('envAsFile'), new File('file'), new Base64Decode('base64Decode'), new TemporaryFile('temporaryFile'), new InSql('inSql')]; + return [new EnvAsFile('envAsFile'), new File('file'), new Base64Decode('base64Decode'), new TemporaryFile('temporaryFile'), new InSql('inSql')]; } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L17
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L19
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => []])); } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L22
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L24
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L34
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: []), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); } }
infection: src/Feature/Logger/Builder/StderrLogger.php#L41
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { public function getNode() : Node\Expr { - return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => [new Node\Stmt\Expression(new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('file_put_contents'), args: [new Node\Arg(value: new Node\Scalar\String_('php://stderr')), new Node\Arg(value: new Node\Expr\BinaryOp\Concat(left: new Node\Expr\FuncCall(name: new Node\Name\FullyQualified('sprintf'), args: [new Node\Arg(value: new Node\Scalar\String_('[%s] %s')), new Node\Arg(value: new Node\Expr\Variable('level')), new Node\Arg(value: new Node\Expr\Variable('message'))]), right: new Node\Expr\ConstFetch(name: new Node\Name\FullyQualified('PHP_EOL'))))]))]])]])); + return new Node\Expr\New_(class: new Node\Stmt\Class_(name: null, subNodes: ['extends' => new Node\Name\FullyQualified(\Psr\Log\AbstractLogger::class), 'stmts' => [new Node\Stmt\ClassMethod(name: new Node\Identifier(name: 'log'), subNodes: ['flags' => Node\Stmt\Class_::MODIFIER_PUBLIC, 'params' => [new Node\Param(var: new Node\Expr\Variable(name: 'level')), new Node\Param(var: new Node\Expr\Variable(name: 'message')), new Node\Param(var: new Node\Expr\Variable(name: 'context'), default: new Node\Expr\Array_(attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), type: new Node\Name(name: 'array'))], 'stmts' => []])]])); } }