CLI-1226: Support objects as API params #2013
Annotations
7 warnings
Run Infection for added files only:
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') {
|
Run Infection for added files only:
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') {
|
Run Infection for added files only:
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') {
|
Run Infection for added files only:
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') {
|
Run Infection for added files only:
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') {
|
Run Infection for added files only:
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
|
Run Infection for added files only:
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,
};
}
|
The logs for this run have expired and are no longer available.
Loading