fix body #169
Annotations
6 errors and 40 warnings
|
PHP 8.2 test on ubuntu-24.04
Process completed with exit code 1.
|
|
PHP 8.3 test on ubuntu-24.04
The strategy configuration was canceled because "test.ubuntu-24_04_8_2" failed
|
|
PHP 8.3 test on ubuntu-24.04
Process completed with exit code 1.
|
|
PHP 8.1 test on ubuntu-24.04
The strategy configuration was canceled because "test.ubuntu-24_04_8_2" failed
|
|
PHP 8.4 test on ubuntu-24.04
The strategy configuration was canceled because "test.ubuntu-24_04_8_2" failed
|
|
PHP 8.4 test on ubuntu-24.04
Process completed with exit code 1.
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L225
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function headers(): ArgumentsStringInterface
{
return $this->_headers
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function cookieParams(): MapInterface
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L219
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function bodyStream(): StreamInterface
{
return $this->_bodyStream
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function headers(): ArgumentsStringInterface
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L171
Escaped Mutant for Mutator "MBString":
@@ @@
);
$headers = [];
foreach (array_keys($serverRequest->getHeaders()) as $key) {
- $lowercased = mb_strtolower($key);
+ $lowercased = strtolower($key);
$pos = $headerIndexLowercase->find($lowercased) ?? null;
if ($pos !== null) {
/** @var string $key */
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L149
Escaped Mutant for Mutator "Coalesce":
@@ @@
$acceptBody,
is_array($new->_body)
? $new->_body
- : ($parsedBody ?? [])
+ : ([] ?? $parsedBody)
);
}
}
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L147
Escaped Mutant for Mutator "Ternary":
@@ @@
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
$acceptBody,
- is_array($new->_body)
- ? $new->_body
- : ($parsedBody ?? [])
+ is_array($new->_body) ? $parsedBody ?? [] : $new->_body
);
}
}
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L142
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$acceptBody = $new::acceptBody();
$new->_bodyParsed = arguments(parameters(), []);
if ($acceptBody instanceof UnionParameterInterface) {
- $acceptBody->__invoke($new->_body);
+
} else {
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L136
Escaped Mutant for Mutator "Identical":
@@ @@
$new->_body = $streamed;
}
}
- } elseif ($new->_body === null) {
+ } elseif ($new->_body !== null) {
$new->_body = $new->_bodyStream->__toString();
}
$acceptBody = $new::acceptBody();
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if (!($new->_body === null) && !($streamed !== '')) {
$new->_body = $streamed;
}
}
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "NotIdentical":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if ($new->_body === null && $streamed === '') {
$new->_body = $streamed;
}
}
|
|
PHP 8.2 test on ubuntu-24.04:
src/Controller.php#L124
Escaped Mutant for Mutator "IfNegation":
@@ @@
try {
$new->_bodyStream = $serverRequest->getBody();
$parsedBody = $serverRequest->getParsedBody();
- if (is_object($parsedBody)) {
+ if (!is_object($parsedBody)) {
$parsedBody = (array) $parsedBody;
}
$new->_body = $parsedBody ?? null;
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L225
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function headers(): ArgumentsStringInterface
{
return $this->_headers
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function cookieParams(): MapInterface
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L219
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function bodyStream(): StreamInterface
{
return $this->_bodyStream
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function headers(): ArgumentsStringInterface
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L171
Escaped Mutant for Mutator "MBString":
@@ @@
);
$headers = [];
foreach (array_keys($serverRequest->getHeaders()) as $key) {
- $lowercased = mb_strtolower($key);
+ $lowercased = strtolower($key);
$pos = $headerIndexLowercase->find($lowercased) ?? null;
if ($pos !== null) {
/** @var string $key */
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L149
Escaped Mutant for Mutator "Coalesce":
@@ @@
$acceptBody,
is_array($new->_body)
? $new->_body
- : ($parsedBody ?? [])
+ : ([] ?? $parsedBody)
);
}
}
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L147
Escaped Mutant for Mutator "Ternary":
@@ @@
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
$acceptBody,
- is_array($new->_body)
- ? $new->_body
- : ($parsedBody ?? [])
+ is_array($new->_body) ? $parsedBody ?? [] : $new->_body
);
}
}
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L142
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$acceptBody = $new::acceptBody();
$new->_bodyParsed = arguments(parameters(), []);
if ($acceptBody instanceof UnionParameterInterface) {
- $acceptBody->__invoke($new->_body);
+
} else {
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L136
Escaped Mutant for Mutator "Identical":
@@ @@
$new->_body = $streamed;
}
}
- } elseif ($new->_body === null) {
+ } elseif ($new->_body !== null) {
$new->_body = $new->_bodyStream->__toString();
}
$acceptBody = $new::acceptBody();
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if (!($new->_body === null) && !($streamed !== '')) {
$new->_body = $streamed;
}
}
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "NotIdentical":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if ($new->_body === null && $streamed === '') {
$new->_body = $streamed;
}
}
|
|
PHP 8.3 test on ubuntu-24.04:
src/Controller.php#L124
Escaped Mutant for Mutator "IfNegation":
@@ @@
try {
$new->_bodyStream = $serverRequest->getBody();
$parsedBody = $serverRequest->getParsedBody();
- if (is_object($parsedBody)) {
+ if (!is_object($parsedBody)) {
$parsedBody = (array) $parsedBody;
}
$new->_body = $parsedBody ?? null;
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L225
Escaped Mutant for Mutator "Throw_":
@@ @@
}
final public function headers(): ArgumentsStringInterface
{
- return $this->_headers ?? throw new BadMethodCallException();
+ return $this->_headers ?? new BadMethodCallException();
}
final public function cookieParams(): MapInterface
{
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L219
Escaped Mutant for Mutator "Throw_":
@@ @@
}
final public function bodyStream(): StreamInterface
{
- return $this->_bodyStream ?? throw new BadMethodCallException();
+ return $this->_bodyStream ?? new BadMethodCallException();
}
final public function headers(): ArgumentsStringInterface
{
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L225
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function headers(): ArgumentsStringInterface
{
return $this->_headers
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function cookieParams(): MapInterface
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L171
Escaped Mutant for Mutator "MBString":
@@ @@
$headerIndexLowercase = new Vector(...array_map('mb_strtolower', $parameterKeys));
$headers = [];
foreach (array_keys($serverRequest->getHeaders()) as $key) {
- $lowercased = mb_strtolower($key);
+ $lowercased = strtolower($key);
$pos = $headerIndexLowercase->find($lowercased) ?? null;
if ($pos !== null) {
/** @var string $key */
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L149
Escaped Mutant for Mutator "Coalesce":
@@ @@
if ($acceptBody instanceof UnionParameterInterface) {
$acceptBody->__invoke($new->_body);
} else if ($acceptBody instanceof ParametersAccessInterface) {
- $new->_bodyParsed = arguments($acceptBody, is_array($new->_body) ? $new->_body : $parsedBody ?? []);
+ $new->_bodyParsed = arguments($acceptBody, is_array($new->_body) ? $new->_body : [] ?? $parsedBody);
}
} catch (Throwable $e) {
throw new ControllerException('[HTTP body] ' . $e->getMessage(), 400, $e, controller: static::class);
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L219
Escaped Mutant for Mutator "Throw_":
@@ @@
final public function bodyStream(): StreamInterface
{
return $this->_bodyStream
- ?? throw new BadMethodCallException();
+ ?? new BadMethodCallException();
}
final public function headers(): ArgumentsStringInterface
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L147
Escaped Mutant for Mutator "Ternary":
@@ @@
if ($acceptBody instanceof UnionParameterInterface) {
$acceptBody->__invoke($new->_body);
} else if ($acceptBody instanceof ParametersAccessInterface) {
- $new->_bodyParsed = arguments($acceptBody, is_array($new->_body) ? $new->_body : $parsedBody ?? []);
+ $new->_bodyParsed = arguments($acceptBody, is_array($new->_body) ? $parsedBody ?? [] : $new->_body);
}
} catch (Throwable $e) {
throw new ControllerException('[HTTP body] ' . $e->getMessage(), 400, $e, controller: static::class);
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L171
Escaped Mutant for Mutator "MBString":
@@ @@
);
$headers = [];
foreach (array_keys($serverRequest->getHeaders()) as $key) {
- $lowercased = mb_strtolower($key);
+ $lowercased = strtolower($key);
$pos = $headerIndexLowercase->find($lowercased) ?? null;
if ($pos !== null) {
/** @var string $key */
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L142
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$acceptBody = $new::acceptBody();
$new->_bodyParsed = arguments(parameters(), []);
if ($acceptBody instanceof UnionParameterInterface) {
- $acceptBody->__invoke($new->_body);
+
} else if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments($acceptBody, is_array($new->_body) ? $new->_body : $parsedBody ?? []);
}
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L149
Escaped Mutant for Mutator "Coalesce":
@@ @@
$acceptBody,
is_array($new->_body)
? $new->_body
- : ($parsedBody ?? [])
+ : ([] ?? $parsedBody)
);
}
}
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L147
Escaped Mutant for Mutator "Ternary":
@@ @@
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
$acceptBody,
- is_array($new->_body)
- ? $new->_body
- : ($parsedBody ?? [])
+ is_array($new->_body) ? $parsedBody ?? [] : $new->_body
);
}
}
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L136
Escaped Mutant for Mutator "Identical":
@@ @@
$new->_body = $streamed;
}
}
- } elseif ($new->_body === null) {
+ } elseif ($new->_body !== null) {
$new->_body = $new->_bodyStream->__toString();
}
$acceptBody = $new::acceptBody();
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L142
Escaped Mutant for Mutator "MethodCallRemoval":
@@ @@
$acceptBody = $new::acceptBody();
$new->_bodyParsed = arguments(parameters(), []);
if ($acceptBody instanceof UnionParameterInterface) {
- $acceptBody->__invoke($new->_body);
+
} else {
if ($acceptBody instanceof ParametersAccessInterface) {
$new->_bodyParsed = arguments(
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
if (!$new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if (!($new->_body === null) && !($streamed !== '')) {
$new->_body = $streamed;
}
}
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L136
Escaped Mutant for Mutator "Identical":
@@ @@
$new->_body = $streamed;
}
}
- } elseif ($new->_body === null) {
+ } elseif ($new->_body !== null) {
$new->_body = $new->_bodyStream->__toString();
}
$acceptBody = $new::acceptBody();
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "NotIdentical":
@@ @@
if (!$new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if ($new->_body === null && $streamed === '') {
$new->_body = $streamed;
}
}
|
|
PHP 8.1 test on ubuntu-24.04:
src/Controller.php#L124
Escaped Mutant for Mutator "IfNegation":
@@ @@
try {
$new->_bodyStream = $serverRequest->getBody();
$parsedBody = $serverRequest->getParsedBody();
- if (is_object($parsedBody)) {
+ if (!is_object($parsedBody)) {
$parsedBody = (array) $parsedBody;
}
$new->_body = $parsedBody ?? null;
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if (!($new->_body === null) && !($streamed !== '')) {
$new->_body = $streamed;
}
}
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L132
Escaped Mutant for Mutator "NotIdentical":
@@ @@
if (! $new->_body) {
$streamed = $new->_bodyStream->__toString();
$new->_body = json_decode($streamed, true);
- if ($new->_body === null && $streamed !== '') {
+ if ($new->_body === null && $streamed === '') {
$new->_body = $streamed;
}
}
|
|
PHP 8.4 test on ubuntu-24.04:
src/Controller.php#L124
Escaped Mutant for Mutator "IfNegation":
@@ @@
try {
$new->_bodyStream = $serverRequest->getBody();
$parsedBody = $serverRequest->getParsedBody();
- if (is_object($parsedBody)) {
+ if (!is_object($parsedBody)) {
$parsedBody = (array) $parsedBody;
}
$new->_body = $parsedBody ?? null;
|