fix tests, add a check on api_type parameter #122
Annotations
1 error and 10 warnings
infection
Process completed with exit code 1.
|
infection:
src/Builder/Capacity/All.php#L63
Escaped Mutant for Mutator "UnwrapArrayFilter":
--- Original
+++ New
@@ @@
if (null === $this->endpoint) {
throw new MissingEndpointException(message: 'Please check your capacity builder, you should have selected an endpoint.');
}
- return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: array_filter([new Node\Arg(value: new Node\Expr\Array_(items: $this->compileSearch(), attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), name: new Node\Identifier('queryParameters')), null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null])), unpack: true)])));
+ return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: [new Node\Arg(value: new Node\Expr\Array_(items: $this->compileSearch(), attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), name: new Node\Identifier('queryParameters')), null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null]), unpack: true)])));
}
private function compileSearch() : array
{
|
infection:
src/Builder/Capacity/All.php#L64
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->endpoint) {
throw new MissingEndpointException(message: 'Please check your capacity builder, you should have selected an endpoint.');
}
- return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: array_filter([new Node\Arg(value: new Node\Expr\Array_(items: $this->compileSearch(), attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), name: new Node\Identifier('queryParameters')), null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null])), unpack: true)])));
+ return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: array_filter([null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null])), unpack: true)])));
}
private function compileSearch() : array
{
|
infection:
src/Builder/Capacity/All.php#L68
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->endpoint) {
throw new MissingEndpointException(message: 'Please check your capacity builder, you should have selected an endpoint.');
}
- return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: array_filter([new Node\Arg(value: new Node\Expr\Array_(items: $this->compileSearch(), attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]), name: new Node\Identifier('queryParameters')), null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null])), unpack: true)])));
+ return new Node\Stmt\Expression(expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), name: new Node\Identifier('all'), args: array_filter([new Node\Arg(value: new Node\Expr\Array_(items: $this->compileSearch(), attributes: []), name: new Node\Identifier('queryParameters')), null !== $this->code ? new Node\Arg(value: $this->code, name: new Node\Identifier('code')) : null])), unpack: true)])));
}
private function compileSearch() : array
{
|
infection:
src/Builder/Capacity/All.php#L95
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->search) {
return [];
}
- return [new Node\Expr\ArrayItem($this->search, new Node\Scalar\String_('search'))];
+ return [];
}
}
|
infection:
src/Builder/Capacity/Create.php#L59
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new N
|
infection:
src/Builder/Capacity/Create.php#L100
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
}
}
|
infection:
src/Builder/Capacity/Create.php#L108
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem
|
infection:
src/Builder/Capacity/Create.php#L117
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new N
|
infection:
src/Builder/Capacity/Create.php#L136
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception
|
infection:
src/Builder/Capacity/Create.php#L151
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (null === $this->data) {
throw new MissingParameterException(message: 'Please check your capacity builder, you should have provided some data.');
}
- return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception')), new Node\Expr\ArrayItem(value: new Node\Expr\Variable('line'), key: new Node\Scalar\String_('item')), new Node\Expr\ArrayItem(value: new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), key: new Node\Scalar\String_('response')), new Node\Expr\ArrayItem(value: new Node\Expr\FuncCall(new Node\Name\FullyQualified('json_decode'), [new Node\Arg(new Node\Expr\MethodCall(new Node\Expr\MethodCall(new Node\Expr\Variable('exception'), new Node\Identifier('getResponse')), new Node\Identifier('getBody')))]), key: new Node\Scalar\String_('body'))], attributes: ['kind' => Node\Expr\Array_::KIND_SHORT]))])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\RejectionResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('exception')), new Node\Arg(value: new Node\Expr\Variable('line'))]))))])])]);
+ return new Node\Stmt\While_(cond: new Node\Expr\ConstFetch(new Node\Name('true')), stmts: [new Node\Stmt\TryCatch(stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: new Node\Identifier('client')), name: $this->endpoint), new Node\Identifier('create'), [new Node\Arg(value: $this->code), new Node\Arg(value: $this->data)])), new Node\Stmt\Expression(expr: new Node\Expr\Assign(var: new Node\Expr\Variable('line'), expr: new Node\Expr\Yield_(value: new Node\Expr\New_(class: new Node\Name\FullyQualified(name: \Kiboko\Component\Bucket\AcceptanceResultBucket::class), args: [new Node\Arg(value: new Node\Expr\Variable('line'))]))))], catches: [new Node\Stmt\Catch_(types: [new Node\Name\FullyQualified(name: \Diglin\Sylius\ApiClient\Exception\HttpException::class)], var: new Node\Expr\Variable('exception'), stmts: [new Node\Stmt\Expression(expr: new Node\Expr\MethodCall(var: new Node\Expr\PropertyFetch(var: new Node\Expr\Variable('this'), name: 'logger'), name: new Node\Identifier('error'), args: [new Node\Arg(value: new Node\Expr\MethodCall(var: new Node\Expr\Variable('exception'), name: new Node\Identifier('getMessage'))), new Node\Arg(value: new Node\Expr\Array_(items: [new Node\Expr\ArrayItem(value: new Node\Expr\Variable('exception'), key: new Node\Scalar\String_('exception
|