ci #1
Annotations
1 error and 12 warnings
Run Infection PHP
Process completed with exit code 1.
|
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Run Infection PHP:
src/Memcached.php#L50
Escaped Mutant for Mutator "UnwrapTrim":
--- Original
+++ New
@@ @@
throw new ResponseErrorException('Cannot read header');
}
if (strpos($header, 'VALUE ') === 0) {
- [, , , $bytes] = explode(' ', trim($header));
+ [, , , $bytes] = explode(' ', $header);
if (!is_numeric($bytes)) {
throw new ResponseErrorException('Cannot parse header');
}
|
Run Infection PHP:
src/Memcached.php#L79
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public function set(string $key, string $data, int $ttl = null): void
{
- self::validateKey($key);
+
if ($ttl === null) {
$ttl = self::DEFAULT_TTL;
}
|
Run Infection PHP:
src/Memcached.php#L80
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
public function set(string $key, string $data, int $ttl = null): void
{
self::validateKey($key);
- if ($ttl === null) {
+ if ($ttl !== null) {
$ttl = self::DEFAULT_TTL;
}
$flags = 0;
|
Run Infection PHP:
src/Memcached.php#L83
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
if ($ttl === null) {
$ttl = self::DEFAULT_TTL;
}
- $flags = 0;
+ $flags = -1;
$bytes = mb_strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
|
Run Infection PHP:
src/Memcached.php#L84
Escaped Mutant for Mutator "MBString":
--- Original
+++ New
@@ @@
$ttl = self::DEFAULT_TTL;
}
$flags = 0;
- $bytes = mb_strlen($data);
+ $bytes = strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
throw new MemcachedException('Data is not Stored, reason: ' . ($line ?: 'line is empty'));
|
Run Infection PHP:
src/Memcached.php#L94
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
$bytes = mb_strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
- throw new MemcachedException('Data is not Stored, reason: ' . ($line ?: 'line is empty'));
+ throw new MemcachedException('Data is not Stored, reason: ' . ($line ? 'line is empty' : $line));
}
}
/**
|
Run Infection PHP:
src/Memcached.php#L94
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
$bytes = mb_strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
- throw new MemcachedException('Data is not Stored, reason: ' . ($line ?: 'line is empty'));
+ throw new MemcachedException(($line ?: 'line is empty') . 'Data is not Stored, reason: ');
}
}
/**
|
Run Infection PHP:
src/Memcached.php#L94
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$bytes = mb_strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
- throw new MemcachedException('Data is not Stored, reason: ' . ($line ?: 'line is empty'));
+ throw new MemcachedException('Data is not Stored, reason: ');
}
}
/**
|
Run Infection PHP:
src/Memcached.php#L94
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
$bytes = mb_strlen($data);
$line = $this->command(sprintf("set %s %d %d %d\r\n%s", $key, $flags, $ttl, $bytes, $data))->current();
if ($line !== 'STORED') {
- throw new MemcachedException('Data is not Stored, reason: ' . ($line ?: 'line is empty'));
+ throw new MemcachedException($line ?: 'line is empty');
}
}
/**
|
Run Infection PHP:
src/Memcached.php#L105
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
*/
public function delete(string $key): void
{
- self::validateKey($key);
+
$this->command(sprintf('delete %s noreply', $key), true)->current();
}
/**
|
Loading