wip #163
Annotations
1 error and 10 warnings
|
src/Traits/ClientTrait.php#L70
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
{
|
src/Traits/ClientTrait.php#L76
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
try {
$curl = $this->getCurlHandle(new PostMethod(), 'messages', $message->toArray());
- $curl->exec();
+
} finally {
unset($curl);
}
|
src/Traits/ClientTrait.php#L84
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
{
|
src/Traits/ClientTrait.php#L90
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
{
try {
$curl = $this->getCurlHandle(new PostMethod(), 'pauses', $message->toArray());
- $curl->exec();
+
$curlError = $curl->error();
if ($curlError === '') {
do {
|
src/Traits/ClientTrait.php#L94
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$curlError = $curl->error();
if ($curlError === '') {
do {
- sleep(1);
+ sleep(0);
} while ($this->isPaused($message->id()));
}
} finally {
|
src/Traits/ClientTrait.php#L94
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
$curlError = $curl->error();
if ($curlError === '') {
do {
- sleep(1);
+
} while ($this->isPaused($message->id()));
}
} finally {
|
src/Traits/ClientTrait.php#L94
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
$curlError = $curl->error();
if ($curlError === '') {
do {
- sleep(1);
+ sleep(2);
} while ($this->isPaused($message->id()));
}
} finally {
|
src/Traits/ClientTrait.php#L104
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
{
|
src/Traits/ClientTrait.php#L107
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;
|
src/Traits/ClientTrait.php#L107
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;
|
The logs for this run have expired and are no longer available.
Loading