Skip to content

improve mt

improve mt #162

Triggered via push August 8, 2023 13:22
Status Failure
Total duration 1m 30s
Artifacts

test.yml

on: push
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 20 warnings
PHP 8.1 test on ubuntu-latest
Process completed with exit code 1.
PHP 8.2 test on ubuntu-latest
The job was canceled because "ubuntu-latest_8_1" failed.
PHP 8.2 test on ubuntu-latest
Process completed with exit code 1.
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L69
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function sendMessage(MessageInterface $message) : void { - try { - $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); - $curl->exec(); - } finally { - unset($curl); - } + $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); + $curl->exec(); + unset($curl); } public function sendPause(MessageInterface $message) : void {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L75
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { try { $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); - $curl->exec(); + } finally { unset($curl); }
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L83
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function sendPause(MessageInterface $message) : void { - try { - $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); - $curl->exec(); - $curlError = $curl->error(); - if ($curlError === '') { - do { - sleep(1); - } while ($this->isPaused($message->id())); - } - } finally { - unset($curl); + $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); + $curl->exec(); + $curlError = $curl->error(); + if ($curlError === '') { + do { + sleep(1); + } while ($this->isPaused($message->id())); } + unset($curl); } public function isPaused(string $id) : bool {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L89
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { try { $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); - $curl->exec(); + $curlError = $curl->error(); if ($curlError === '') { do {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + sleep(0); } while ($this->isPaused($message->id())); } } finally {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + } while ($this->isPaused($message->id())); } } finally {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + sleep(2); } while ($this->isPaused($message->id())); } } finally {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L103
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function isPaused(string $id) : bool { - try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); - $curlResult = $curl->exec(); - if (!$curlResult || $curl->error() !== '') { - return false; - } - /** @var object $response */ - $response = json_decode(strval($curlResult)); - if ($response->stop ?? false) { - throw new StopException(message('[STOP EXECUTION] triggered from %remote%')->withTranslate('%remote%', $this->host . ':' . $this->port)); - } - return true; - } finally { - unset($curl); + $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curlResult = $curl->exec(); + if (!$curlResult || $curl->error() !== '') { + return false; } + /** @var object $response */ + $response = json_decode(strval($curlResult)); + if ($response->stop ?? false) { + throw new StopException(message('[STOP EXECUTION] triggered from %remote%')->withTranslate('%remote%', $this->host . ':' . $this->port)); + } + return true; + unset($curl); } public function options() : array {
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L106
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ public function isPaused(string $id) : bool { try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curl = $this->getCurlHandle(new GetMethod(), $id . 'pauses/', []); $curlResult = $curl->exec(); if (!$curlResult || $curl->error() !== '') { return false;
PHP 8.1 test on ubuntu-latest: src/Traits/ClientTrait.php#L106
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ public function isPaused(string $id) : bool { try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curl = $this->getCurlHandle(new GetMethod(), $id, []); $curlResult = $curl->exec(); if (!$curlResult || $curl->error() !== '') { return false;
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L69
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function sendMessage(MessageInterface $message) : void { - try { - $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); - $curl->exec(); - } finally { - unset($curl); - } + $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); + $curl->exec(); + unset($curl); } public function sendPause(MessageInterface $message) : void {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L75
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { try { $curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray()); - $curl->exec(); + } finally { unset($curl); }
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L83
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function sendPause(MessageInterface $message) : void { - try { - $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); - $curl->exec(); - $curlError = $curl->error(); - if ($curlError === '') { - do { - sleep(1); - } while ($this->isPaused($message->id())); - } - } finally { - unset($curl); + $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); + $curl->exec(); + $curlError = $curl->error(); + if ($curlError === '') { + do { + sleep(1); + } while ($this->isPaused($message->id())); } + unset($curl); } public function isPaused(string $id) : bool {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L89
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { try { $curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray()); - $curl->exec(); + $curlError = $curl->error(); if ($curlError === '') { do {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + sleep(0); } while ($this->isPaused($message->id())); } } finally {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + } while ($this->isPaused($message->id())); } } finally {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L93
Escaped Mutant for Mutator "IncrementInteger": --- Original +++ New @@ @@ $curlError = $curl->error(); if ($curlError === '') { do { - sleep(1); + sleep(2); } while ($this->isPaused($message->id())); } } finally {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L103
Escaped Mutant for Mutator "UnwrapFinally": --- Original +++ New @@ @@ } public function isPaused(string $id) : bool { - try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); - $curlResult = $curl->exec(); - if (!$curlResult || $curl->error() !== '') { - return false; - } - /** @var object $response */ - $response = json_decode(strval($curlResult)); - if ($response->stop ?? false) { - throw new StopException(message('[STOP EXECUTION] triggered from %remote%')->withTranslate('%remote%', $this->host . ':' . $this->port)); - } - return true; - } finally { - unset($curl); + $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curlResult = $curl->exec(); + if (!$curlResult || $curl->error() !== '') { + return false; } + /** @var object $response */ + $response = json_decode(strval($curlResult)); + if ($response->stop ?? false) { + throw new StopException(message('[STOP EXECUTION] triggered from %remote%')->withTranslate('%remote%', $this->host . ':' . $this->port)); + } + return true; + unset($curl); } public function options() : array {
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L106
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ public function isPaused(string $id) : bool { try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curl = $this->getCurlHandle(new GetMethod(), $id . 'pauses/', []); $curlResult = $curl->exec(); if (!$curlResult || $curl->error() !== '') { return false;
PHP 8.2 test on ubuntu-latest: src/Traits/ClientTrait.php#L106
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ public function isPaused(string $id) : bool { try { - $curl = $this->getCurlHandle(new GetMethod(), 'pauses/' . $id, []); + $curl = $this->getCurlHandle(new GetMethod(), $id, []); $curlResult = $curl->exec(); if (!$curlResult || $curl->error() !== '') { return false;