Skip to content

Improve psalm analysis (#158) #595

Improve psalm analysis (#158)

Improve psalm analysis (#158) #595

Triggered via push April 26, 2024 07:11
Status Success
Total duration 1m 56s
Artifacts

mutation.yml

on: push
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L756
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ /** @var mixed $element */ foreach ($array as $element) { if (!is_array($element) && !is_object($element)) { - throw new InvalidArgumentException('index() can not get value from ' . gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); + throw new InvalidArgumentException(gettype($element) . 'index() can not get value from ' . '. The $array should be either multidimensional array or an array of objects.'); } $lastArray =& $result; foreach ($groups as $group) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L756
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ /** @var mixed $element */ foreach ($array as $element) { if (!is_array($element) && !is_object($element)) { - throw new InvalidArgumentException('index() can not get value from ' . gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); + throw new InvalidArgumentException(gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); } $lastArray =& $result; foreach ($groups as $group) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L756
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ /** @var mixed $element */ foreach ($array as $element) { if (!is_array($element) && !is_object($element)) { - throw new InvalidArgumentException('index() can not get value from ' . gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); + throw new InvalidArgumentException('index() can not get value from ' . '. The $array should be either multidimensional array or an array of objects.'); } $lastArray =& $result; foreach ($groups as $group) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L756
Escaped Mutant for Mutator "Concat": --- Original +++ New @@ @@ /** @var mixed $element */ foreach ($array as $element) { if (!is_array($element) && !is_object($element)) { - throw new InvalidArgumentException('index() can not get value from ' . gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); + throw new InvalidArgumentException('index() can not get value from ' . '. The $array should be either multidimensional array or an array of objects.' . gettype($element)); } $lastArray =& $result; foreach ($groups as $group) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L756
Escaped Mutant for Mutator "ConcatOperandRemoval": --- Original +++ New @@ @@ /** @var mixed $element */ foreach ($array as $element) { if (!is_array($element) && !is_object($element)) { - throw new InvalidArgumentException('index() can not get value from ' . gettype($element) . '. The $array should be either multidimensional array or an array of objects.'); + throw new InvalidArgumentException('index() can not get value from ' . gettype($element)); } $lastArray =& $result; foreach ($groups as $group) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L940
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ * * @return bool Whether the array contains the specified key. */ - public static function keyExists(array $array, array|float|int|string $key, bool $caseSensitive = true) : bool + public static function keyExists(array $array, array|float|int|string $key, bool $caseSensitive = false) : bool { if (is_array($key)) { if (count($key) === 1) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L1013
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ * * @psalm-param ArrayPath $path */ - public static function pathExists(array $array, array|float|int|string $path, bool $caseSensitive = true, string $delimiter = '.') : bool + public static function pathExists(array $array, array|float|int|string $path, bool $caseSensitive = false, string $delimiter = '.') : bool { return self::keyExists($array, self::parseMixedPath($path, $delimiter), $caseSensitive); }
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L1314
Escaped Mutant for Mutator "DecrementInteger": --- Original +++ New @@ @@ $numNestedKeys = count($keys) - 1; foreach ($keys as $i => $key) { if (!is_array($excludeNode) || !array_key_exists($key, $excludeNode)) { - continue 2; + continue 1; // Jump to next filter. } if ($i < $numNestedKeys) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L1314
Escaped Mutant for Mutator "Continue_": --- Original +++ New @@ @@ $numNestedKeys = count($keys) - 1; foreach ($keys as $i => $key) { if (!is_array($excludeNode) || !array_key_exists($key, $excludeNode)) { - continue 2; + break; // Jump to next filter. } if ($i < $numNestedKeys) {
mutation / PHP 8.2-ubuntu-latest: src/ArrayHelper.php#L1322
Escaped Mutant for Mutator "Break_": --- Original +++ New @@ @@ $excludeNode =& $excludeNode[$key]; } else { unset($excludeNode[$key]); - break; + continue; } } }