feat: add automation, linting and improve DX #19
Annotations
10 warnings
🧪 Run mutation testing using Xdebug and infection/infection:
src/Database.php#L82
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
}
public function withPrefix(string $prefix, bool $add = true) : DatabaseInterface
{
- $database = clone $this;
+ $database = $this;
$add ? $database->prefix .= $prefix : ($database->prefix = $prefix);
return $database;
}
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Database.php#L111
Escaped Mutant for Mutator "Ternary":
--- Original
+++ New
@@ @@
$schemaHandler = $this->getDriver(self::READ)->getSchemaHandler();
$result = [];
foreach ($schemaHandler->getTableNames($this->prefix) as $table) {
- $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : substr($table, strlen($this->prefix));
+ $table = str_contains($table, '.') ? substr($table, strlen($this->prefix)) : str_replace('.' . $this->prefix, '.', $table);
$result[] = new Table($this, $table);
}
return $result;
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Database.php#L113
Escaped Mutant for Mutator "UnwrapSubstr":
--- Original
+++ New
@@ @@
$schemaHandler = $this->getDriver(self::READ)->getSchemaHandler();
$result = [];
foreach ($schemaHandler->getTableNames($this->prefix) as $table) {
- $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : substr($table, strlen($this->prefix));
+ $table = str_contains($table, '.') ? str_replace('.' . $this->prefix, '.', $table) : $table;
$result[] = new Table($this, $table);
}
return $result;
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Database.php#L189
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$this->begin($isolationLevel);
try {
$result = $callback($this);
- $this->commit();
+
return $result;
} catch (Throwable $e) {
$this->rollback();
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L73
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
if ($tokens['offset'] !== null) {
$params->push(new Parameter($tokens['offset']));
}
- return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);
+ return '_' . ($tokens['limit'] !== null) . '_' . ($tokens['offset'] === null);
}
/**
* @psalm-return non-empty-string
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L73
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
if ($tokens['offset'] !== null) {
$params->push(new Parameter($tokens['offset']));
}
- return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);
+ return ($tokens['limit'] === null) . '_' . '_' . ($tokens['offset'] === null);
}
/**
* @psalm-return non-empty-string
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L73
Escaped Mutant for Mutator "ConcatOperandRemoval":
--- Original
+++ New
@@ @@
if ($tokens['offset'] !== null) {
$params->push(new Parameter($tokens['offset']));
}
- return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);
+ return ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);
}
/**
* @psalm-return non-empty-string
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L73
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
if ($tokens['offset'] !== null) {
$params->push(new Parameter($tokens['offset']));
}
- return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] === null);
+ return '_' . ($tokens['limit'] === null) . '_' . ($tokens['offset'] !== null);
}
/**
* @psalm-return non-empty-string
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L89
Escaped Mutant for Mutator "Foreach_":
--- Original
+++ New
@@ @@
$tokens = $fragment->getTokens();
switch ($fragment->getType()) {
case self::FRAGMENT:
- foreach ($tokens['parameters'] as $param) {
+ foreach (array() as $param) {
$params->push($param);
}
return $tokens['fragment'];
|
🧪 Run mutation testing using Xdebug and infection/infection:
src/Driver/Compiler.php#L90
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
switch ($fragment->getType()) {
case self::FRAGMENT:
foreach ($tokens['parameters'] as $param) {
- $params->push($param);
+
}
return $tokens['fragment'];
case self::EXPRESSION:
|
The logs for this run have expired and are no longer available.
Loading