Skip to content

CLI-1226: Support objects as API params #2013

CLI-1226: Support objects as API params

CLI-1226: Support objects as API params #2013

Triggered via pull request December 8, 2023 19:06
Status Success
Total duration 5m 30s
Artifacts

mutation.yml

on: pull_request
Mutation Testing
5m 22s
Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

7 warnings
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ } $types[] = $type['type']; } - if (in_array('integer', $types, TRUE) && ctype_digit($value)) { + if (in_array('integer', $types, TRUE) || ctype_digit($value)) { return $this->doCastParamType('integer', $value); } } elseif ($paramSpec['type'] === 'array') {
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalAndNegation": --- Original +++ New @@ @@ } $types[] = $type['type']; } - if (in_array('integer', $types, TRUE) && ctype_digit($value)) { + if (!(in_array('integer', $types, TRUE) && ctype_digit($value))) { return $this->doCastParamType('integer', $value); } } elseif ($paramSpec['type'] === 'array') {
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ } $types[] = $type['type']; } - if (in_array('integer', $types, TRUE) && ctype_digit($value)) { + if (!in_array('integer', $types, TRUE) && ctype_digit($value)) { return $this->doCastParamType('integer', $value); } } elseif ($paramSpec['type'] === 'array') {
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ } $types[] = $type['type']; } - if (in_array('integer', $types, TRUE) && ctype_digit($value)) { + if (!in_array('integer', $types, TRUE) && !ctype_digit($value)) { return $this->doCastParamType('integer', $value); } } elseif ($paramSpec['type'] === 'array') {
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation": --- Original +++ New @@ @@ } $types[] = $type['type']; } - if (in_array('integer', $types, TRUE) && ctype_digit($value)) { + if (in_array('integer', $types, TRUE) && !ctype_digit($value)) { return $this->doCastParamType('integer', $value); } } elseif ($paramSpec['type'] === 'array') {
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L211
Escaped Mutant for Mutator "MatchArmRemoval": --- Original +++ New @@ @@ 'array' => is_string($value) ? explode(',', $value) : (array) $value, 'string' => (string) $value, 'object' => json_decode($value, FALSE, 512, JSON_THROW_ON_ERROR), - 'mixed' => $value, }; } public function castBool(mixed $val) : bool
Mutation Testing: src/Command/Api/ApiBaseCommand.php#L216
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ 'boolean' => $this->castBool($value), 'array' => is_string($value) ? explode(',', $value) : (array) $value, 'string' => (string) $value, - 'object' => json_decode($value, FALSE, 512, JSON_THROW_ON_ERROR), + 'object' => json_decode($value, FALSE, 511, JSON_THROW_ON_ERROR), 'mixed' => $value, }; }