Skip to content

Replace data response by data stream (big refactoring) #428

Replace data response by data stream (big refactoring)

Replace data response by data stream (big refactoring) #428

Triggered via pull request February 5, 2026 08:40
@vjikvjik
synchronize #107
refactor
Status Success
Total duration 1m 3s
Artifacts

mutation.yml

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

Annotations

10 warnings
mutation / PHP 8.5-ubuntu-latest: src/DataStream/StringStream.php#L123
Escaped Mutant for Mutator "GreaterThanOrEqualTo": @@ @@ throw new RuntimeException('Length must be non-negative.'); } - if ($this->position >= $this->getContentSize()) { + if ($this->position > $this->getContentSize()) { return ''; }
mutation / PHP 8.5-ubuntu-latest: src/DataStream/StringStream.php#L119
Escaped Mutant for Mutator "LessThan": @@ @@ throw new RuntimeException('Stream is closed.'); } - if ($length < 0) { + if ($length <= 0) { throw new RuntimeException('Length must be non-negative.'); }
mutation / PHP 8.5-ubuntu-latest: src/DataStream/StringStream.php#L86
Escaped Mutant for Mutator "GreaterThan": @@ @@ default => throw new RuntimeException('Invalid whence value.'), }; - if ($newPosition < 0 || $newPosition > $size) { + if ($newPosition < 0 || $newPosition >= $size) { throw new RuntimeException('Invalid seek position.'); }
mutation / PHP 8.5-ubuntu-latest: src/DataStream/StringStream.php#L63
Escaped Mutant for Mutator "LogicalOrAllSubExprNegation": @@ @@ public function eof(): bool { - return $this->closed || $this->position >= $this->getContentSize(); + return !$this->closed || !($this->position >= $this->getContentSize()); } public function isSeekable(): bool
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L196
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->responseFormatter = $responseFormatter; - $new->resetFormatted(); + return $new; }
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L185
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->response = $this->response->withStatus($code, $reasonPhrase); - $new->resetFormatted(); + return $new; }
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L177
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->response = $this->response->withProtocolVersion($version); - $new->resetFormatted(); + return $new; }
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L161
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->response = $this->response->withHeader($name, $value); - $new->resetFormatted(); + return $new; }
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L150
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->response = $this->response->withBody($body); - $new->resetFormatted(); + $new->dataStream = $body; $new->forcedBody = true; $new->data = null;
mutation / PHP 8.5-ubuntu-latest: src/DataResponse.php#L142
Escaped Mutant for Mutator "MethodCallRemoval": @@ @@ { $new = clone $this; $new->response = $this->response->withAddedHeader($name, $value); - $new->resetFormatted(); + return $new; }