This repository has been archived by the owner on Jul 6, 2024. It is now read-only.
CI #815
Annotations
10 warnings
composer test:
src/Accessor/PropertyAccessor.php#L42
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$object->__load();
}
$reflectionParentClass = (new \ReflectionObject($object))->getParentClass();
- if ($reflectionParentClass instanceof \ReflectionClass) {
+ if (true) {
return $reflectionParentClass->getName();
}
}
|
composer test:
src/Accessor/PropertyAccessor.php#L42
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$object->__load();
}
$reflectionParentClass = (new \ReflectionObject($object))->getParentClass();
- if ($reflectionParentClass instanceof \ReflectionClass) {
+ if (false) {
return $reflectionParentClass->getName();
}
}
|
composer test:
src/Constraint/AllConstraint.php#L48
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if (null === $value) {
return [];
}
- if (!\is_array($value) && !$value instanceof \Traversable) {
+ if (!\is_array($value) && !false) {
return [new Error($path . '[_all]', 'constraint.all.invalidtype', ['type' => get_debug_type($value)])];
}
$errors = [];
|
composer test:
src/Constraint/BlankConstraint.php#L29
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
if (null === $value) {
return [];
}
- if ('' === $value || [] === $value || $value instanceof \stdClass && [] === (array) $value) {
+ if ('' === $value || [] === $value || true && [] === (array) $value) {
return [];
}
return [new Error($path, 'constraint.blank.notblank')];
}
}
|
composer test:
src/Constraint/CoordinateArrayConstraint.php#L37
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
if (!\is_array($value)) {
return [new Error($path, 'constraint.coordinatearray.invalidtype', ['type' => get_debug_type($value)])];
}
- if (!isset($value['lat']) || !isset($value['lon'])) {
+ if (!isset($value['lat']) && !isset($value['lon'])) {
return [new Error($path, 'constraint.coordinatearray.invalidformat', ['value' => json_encode($value, JSON_THROW_ON_ERROR)])];
}
$lat = $value['lat'];
|
composer test:
src/Constraint/CoordinateArrayConstraint.php#L44
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
}
$lat = $value['lat'];
$lon = $value['lon'];
- if ($lat < -90 || $lat > 90 || $lon < -180 || $lon > 180) {
+ if ($lat < -90 && $lat > 90 || $lon < -180 || $lon > 180) {
return [new Error($path, 'constraint.coordinatearray.invalidvalue', ['value' => json_encode($value, JSON_THROW_ON_ERROR)])];
}
return [];
}
}
|
composer test:
src/Constraint/CoordinateArrayConstraint.php#L44
Escaped Mutant for Mutator "LogicalOr":
--- Original
+++ New
@@ @@
}
$lat = $value['lat'];
$lon = $value['lon'];
- if ($lat < -90 || $lat > 90 || $lon < -180 || $lon > 180) {
+ if (($lat < -90 || $lat > 90) && $lon < -180 || $lon > 180) {
return [new Error($path, 'constraint.coordinatearray.invalidvalue', ['value' => json_encode($value, JSON_THROW_ON_ERROR)])];
}
return [];
}
}
|
composer test:
src/Constraint/CoordinateConstraint.php#L31
Escaped Mutant for Mutator "LogicalAndSingleSubExprNegation":
--- Original
+++ New
@@ @@
if (null === $value || '' === $value) {
return [];
}
- if (!\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
+ if (!\is_scalar($value) && !(\is_object($value) && !method_exists($value, '__toString'))) {
return [new Error($path, 'constraint.coordinate.invalidtype', ['type' => get_debug_type($value)])];
}
$value = (string) $value;
|
composer test:
src/Constraint/CoordinateConstraint.php#L39
Escaped Mutant for Mutator "CastString":
--- Original
+++ New
@@ @@
if (!\is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
return [new Error($path, 'constraint.coordinate.invalidtype', ['type' => get_debug_type($value)])];
}
- $value = (string) $value;
+ $value = $value;
$matches = [];
if (!preg_match(self::PATTERN, $value, $matches)) {
return [new Error($path, 'constraint.coordinate.invalidformat', ['value' => $value])];
|
composer test:
src/Constraint/CoordinateConstraint.php#L47
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
if (!preg_match(self::PATTERN, $value, $matches)) {
return [new Error($path, 'constraint.coordinate.invalidformat', ['value' => $value])];
}
- $lat = (float) $matches[1];
+ $lat = (float) $matches[0];
$lon = (float) $matches[3];
if ($lat < -90 || $lat > 90 || $lon < -180 || $lon > 180) {
return [new Error($path, 'constraint.coordinate.invalidvalue', ['value' => $value])];
|
Loading