Replace StyleCI with PHP CS Fixer (#56) #329
Annotations
8 warnings
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L131
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
continue;
}
}
- if ($countAttributes > 0) {
+ if ($countAttributes >= 0) {
$attributes = $reflection->getAttributes();
$attributes = array_map(static fn(ReflectionAttribute $attribute) => $attribute->getName(), $attributes);
if (count(array_intersect($this->attributes, $attributes)) !== $countAttributes) {
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L122
Escaped Mutant for Mutator "GreaterThan":
--- Original
+++ New
@@ @@
if (count($matchedDirs) === 0) {
continue;
}
- if ($countInterfaces > 0) {
+ if ($countInterfaces >= 0) {
$interfaces = $reflection->getInterfaces();
$interfaces = array_map(static fn(ReflectionClass $class) => $class->getName(), $interfaces);
if (count(array_intersect($this->interfaces, $interfaces)) !== $countInterfaces) {
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L77
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
public function withAttribute(string ...$attributes) : self
{
$new = clone $this;
- array_push($new->attributes, ...array_values($attributes));
+ array_push($new->attributes, ...$attributes);
return $new;
}
/**
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L76
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withAttribute(string ...$attributes) : self
{
- $new = clone $this;
+ $new = $this;
array_push($new->attributes, ...array_values($attributes));
return $new;
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L65
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withParentClass(string $parentClass) : self
{
- $new = clone $this;
+ $new = $this;
$new->parentClass = $parentClass;
return $new;
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L54
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
public function withInterface(string ...$interfaces) : self
{
$new = clone $this;
- array_push($new->interfaces, ...array_values($interfaces));
+ array_push($new->interfaces, ...$interfaces);
return $new;
}
/**
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L53
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function withInterface(string ...$interfaces) : self
{
- $new = clone $this;
+ $new = $this;
array_push($new->interfaces, ...array_values($interfaces));
return $new;
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Classifier.php#L44
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
*/
public function __construct(string $directory, string ...$directories)
{
- $this->directories = [$directory, ...array_values($directories)];
+ $this->directories = [$directory, ...$directories];
}
/**
* @param string ...$interfaces Interfaces to search for.
|