CLI-1226: Support objects as API params #2012
mutation.yml
on: pull_request
Mutation Testing
6m 31s
Annotations
10 warnings
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
}
$types[] = $type['type'];
}
- $isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
+ $isInt = in_array('integer', $types, TRUE) && in_array('int', $types, TRUE);
if ($isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation":
--- Original
+++ New
@@ @@
}
$types[] = $type['type'];
}
- $isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
+ $isInt = !in_array('integer', $types, TRUE) || !in_array('int', $types, TRUE);
if ($isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalOrNegation":
--- Original
+++ New
@@ @@
}
$types[] = $type['type'];
}
- $isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
+ $isInt = !(in_array('integer', $types, TRUE) || in_array('int', $types, TRUE));
if ($isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalOrSingleSubExprNegation":
--- Original
+++ New
@@ @@
}
$types[] = $type['type'];
}
- $isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
+ $isInt = !in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
if ($isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L190
Escaped Mutant for Mutator "LogicalOrSingleSubExprNegation":
--- Original
+++ New
@@ @@
}
$types[] = $type['type'];
}
- $isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
+ $isInt = in_array('integer', $types, TRUE) || !in_array('int', $types, TRUE);
if ($isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L191
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
--- Original
+++ New
@@ @@
$types[] = $type['type'];
}
$isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
- if ($isInt && ctype_digit($value)) {
+ if (!$isInt && !ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
} elseif ($paramSpec['type'] === 'array') {
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L191
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
$types[] = $type['type'];
}
$isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
- if ($isInt && ctype_digit($value)) {
+ if ($isInt || ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
} elseif ($paramSpec['type'] === 'array') {
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L191
Escaped Mutant for Mutator "LogicalAndNegation":
--- Original
+++ New
@@ @@
$types[] = $type['type'];
}
$isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
- if ($isInt && ctype_digit($value)) {
+ if (!($isInt && ctype_digit($value))) {
return $this->doCastParamType('integer', $value);
}
} elseif ($paramSpec['type'] === 'array') {
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L191
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
$types[] = $type['type'];
}
$isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
- if ($isInt && ctype_digit($value)) {
+ if (!$isInt && ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
} elseif ($paramSpec['type'] === 'array') {
|
Mutation Testing:
src/Command/Api/ApiBaseCommand.php#L191
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
$types[] = $type['type'];
}
$isInt = in_array('integer', $types, TRUE) || in_array('int', $types, TRUE);
- if ($isInt && ctype_digit($value)) {
+ if ($isInt && !ctype_digit($value)) {
return $this->doCastParamType('integer', $value);
}
} elseif ($paramSpec['type'] === 'array') {
|