Fix formatter spacing for JSON path operators (->, ->>) #682
Annotations
1 error and 10 warnings
|
Mutation tests with PHP 8.2
Process completed with exit code 1.
|
|
Mutation tests with PHP 8.2:
src/Context.php#L535
Escaped Mutant for Mutator "Break_":
@@ @@
$part = substr($context, $i, 2);
/* No more numeric parts to strip */
if (! is_numeric($part)) {
- break 2;
+ continue;
}
} while (intval($part) === 0 && $i > 0);
|
|
Mutation tests with PHP 8.2:
src/Context.php#L532
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
/* Replace last two non zero digits by zeroes */
do {
$i -= 2;
- $part = substr($context, $i, 2);
+ $part = substr($context, $i, 3);
/* No more numeric parts to strip */
if (! is_numeric($part)) {
break 2;
|
|
Mutation tests with PHP 8.2:
src/Context.php#L532
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
/* Replace last two non zero digits by zeroes */
do {
$i -= 2;
- $part = substr($context, $i, 2);
+ $part = substr($context, $i, 1);
/* No more numeric parts to strip */
if (! is_numeric($part)) {
break 2;
|
|
Mutation tests with PHP 8.2:
src/Context.php#L531
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
/* Replace last two non zero digits by zeroes */
do {
- $i -= 2;
+ $i -= 1;
$part = substr($context, $i, 2);
/* No more numeric parts to strip */
if (! is_numeric($part)) {
|
|
Mutation tests with PHP 8.2:
src/Context.php#L530
Escaped Mutant for Mutator "DoWhile":
@@ @@
if (! is_numeric($part)) {
break 2;
}
- } while (intval($part) === 0 && $i > 0);
+ } while (false);
$context = substr($context, 0, $i) . '00' . substr($context, $i + 2);
}
|
|
Mutation tests with PHP 8.2:
src/Context.php#L523
Escaped Mutant for Mutator "GreaterThan":
@@ @@
public static function loadClosest(string $context = ''): string|null
{
$length = strlen($context);
- for ($i = $length; $i > 0;) {
+ for ($i = $length; $i >= 0;) {
/* Trying to load the new context */
if (static::load($context)) {
return $context;
|
|
Mutation tests with PHP 8.2:
src/Context.php#L495
Escaped Mutant for Mutator "ConcatOperandRemoval":
@@ @@
if (! class_exists($contextClass)) {
$contextClass = self::CONTEXT_PREFIX . $context;
if (! class_exists($contextClass)) {
- $contextClass = '\\' . $context;
+ $contextClass = $context;
if (! class_exists($contextClass)) {
return false;
}
|
|
Mutation tests with PHP 8.2:
src/Context.php#L495
Escaped Mutant for Mutator "Concat":
@@ @@
if (! class_exists($contextClass)) {
$contextClass = self::CONTEXT_PREFIX . $context;
if (! class_exists($contextClass)) {
- $contextClass = '\\' . $context;
+ $contextClass = $context . '\\';
if (! class_exists($contextClass)) {
return false;
}
|
|
Mutation tests with PHP 8.2:
src/Context.php#L468
Escaped Mutant for Mutator "LessThanOrEqualTo":
@@ @@
{
// NOTES: Only non-alphanumeric ASCII characters may be separators.
// `~` is the last printable ASCII character.
- return $string <= '~'
+ return $string < '~'
&& $string !== '_'
&& $string !== '$'
&& ($string < '0' || $string > '9')
|
|
Mutation tests with PHP 8.2:
src/Context.php#L391
Escaped Mutant for Mutator "MatchArmRemoval":
@@ @@
{
return match (true) {
str_starts_with($string, '#') => Token::FLAG_COMMENT_BASH,
- str_starts_with($string, '/*!') => Token::FLAG_COMMENT_MYSQL_CMD,
// If comment is opening C style (/*) or is closing C style (*/), warning, it could conflict
// with wildcard and a real opening C style.
// It would look like the following valid SQL statement: "SELECT */* comment */ FROM...".
|