Skip to content
Triggered via push February 7, 2024 11:56
Status Success
Total duration 37s
Artifacts

mutation.yml

on: push
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

8 warnings
mutation / PHP 8.1-ubuntu-latest: src/Cookie.php#L516
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": --- Original +++ New @@ @@ /** @var string $attributeKey */ [$attributeKey, $attributeValue] = self::splitCookieAttribute($rawAttribute); $attributeKey = strtolower($attributeKey); - if ($attributeValue === null && !in_array($attributeKey, ['secure', 'httponly'], true)) { + if (!($attributeValue === null) && in_array($attributeKey, ['secure', 'httponly'], true)) { continue; } /** @var string $attributeValue */
mutation / PHP 8.1-ubuntu-latest: src/CookieEncryptor.php#L95
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ */ public function isEncrypted(Cookie $cookie) : bool { - return strlen($cookie->getValue()) > 32 && strpos($cookie->getValue(), $this->prefix($cookie)) === 0; + return strlen($cookie->getValue()) >= 32 && strpos($cookie->getValue(), $this->prefix($cookie)) === 0; } /** * Returns a prefix for cookie.
mutation / PHP 8.1-ubuntu-latest: src/CookieMiddleware.php#L107
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ $cookieParams = []; foreach ($request->getCookieParams() as $name => $value) { if (!is_string($name) || !is_string($value)) { - continue; + break; } try { if ($this->match($name, $this->encryption)) {
mutation / PHP 8.1-ubuntu-latest: src/CookieMiddleware.php#L124
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ } } catch (RuntimeException $e) { $this->logger->info($e->getMessage(), ['exception' => $e]); - continue; + break; } $cookieParams[$name] = $value; }
mutation / PHP 8.1-ubuntu-latest: src/CookieMiddleware.php#L149
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $changed = false; $headers = []; foreach ($response->getHeader(Header::SET_COOKIE) as $key => $header) { - [$name] = explode('=', $header, 2); + [$name] = explode('=', $header, 3); if ($this->match($name, $this->encryption)) { $cookie = Cookie::fromCookieString($header); $cookie = $this->encryptor->isEncrypted($cookie) ? $cookie : $this->encryptor->encrypt($cookie);
mutation / PHP 8.1-ubuntu-latest: src/CookieMiddleware.php#L155
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ $cookie = Cookie::fromCookieString($header); $cookie = $this->encryptor->isEncrypted($cookie) ? $cookie : $this->encryptor->encrypt($cookie); $headers[$key] = (string) $cookie; - $changed = true; + $changed = false; continue; } if ($this->match($name, $this->signature)) {
mutation / PHP 8.1-ubuntu-latest: src/CookieMiddleware.php#L164
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ $cookie = $this->signer->isSigned($cookie) ? $cookie : $this->signer->sign($cookie); $headers[$key] = (string) $cookie; $changed = true; - continue; + break; } $headers[$key] = $header; }
mutation / PHP 8.1-ubuntu-latest: src/CookieSigner.php#L94
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ */ public function isSigned(Cookie $cookie) : bool { - return strlen($cookie->getValue()) > 32 && strpos($cookie->getValue(), $this->prefix($cookie)) === 0; + return strlen($cookie->getValue()) >= 32 && strpos($cookie->getValue(), $this->prefix($cookie)) === 0; } /** * Returns a prefix for cookie.