cs-fix #784
Annotations
30 warnings
PHP 8.1:
src/Accessor/MethodAccessor.php#L18
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function setValue(object $object, mixed $value) : void
{
- $set = 'set' . ucfirst($this->property);
+ $set = 'set' . $this->property;
if (!method_exists($object, $set)) {
throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
}
|
PHP 8.1:
src/Accessor/MethodAccessor.php#L20
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
$set = 'set' . ucfirst($this->property);
if (!method_exists($object, $set)) {
- throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
+ throw DeserializerLogicException::createMissingMethod($object::class, []);
}
$object->{$set}($value);
}
|
PHP 8.1:
src/Accessor/MethodAccessor.php#L33
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function getValue(object $object)
{
- $get = 'get' . ucfirst($this->property);
+ $get = 'get' . $this->property;
$has = 'has' . ucfirst($this->property);
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
|
PHP 8.1:
src/Accessor/MethodAccessor.php#L34
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
public function getValue(object $object)
{
$get = 'get' . ucfirst($this->property);
- $has = 'has' . ucfirst($this->property);
+ $has = 'has' . $this->property;
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
return $object->{$get}();
|
PHP 8.1:
src/Accessor/MethodAccessor.php#L35
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
{
$get = 'get' . ucfirst($this->property);
$has = 'has' . ucfirst($this->property);
- $is = 'is' . ucfirst($this->property);
+ $is = 'is' . $this->property;
if (method_exists($object, $get)) {
return $object->{$get}();
}
|
PHP 8.1:
src/Accessor/MethodAccessor.php#L49
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (method_exists($object, $is)) {
return $object->{$is}();
}
- throw DeserializerLogicException::createMissingMethod($object::class, [$get, $has, $is]);
+ throw DeserializerLogicException::createMissingMethod($object::class, [$has, $is]);
}
}
|
PHP 8.1:
src/Accessor/PropertyAccessor.php#L66
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$object->__load();
}
$reflectionParentClass = (new \ReflectionObject($object))->getParentClass();
- if ($reflectionParentClass instanceof \ReflectionClass) {
+ if (true) {
return $reflectionParentClass->getName();
}
}
|
PHP 8.1:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (true === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.1:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L53
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
$value = $dateTime;
}
} catch (\Exception) {
- error_clear_last();
+
}
$this->accessor->setValue($object, $value);
}
}
|
PHP 8.1:
src/Denormalizer/Denormalizer.php#L65
Escaped Mutant for Mutator "UnwrapArrayDiff":
--- Original
+++ New
@@ @@
$this->denormalizeField($context, $denormalizationFieldMapping, $path, $name, $data, $object);
}
$allowedAdditionalFields = $context->getAllowedAdditionalFields();
- if (null !== $allowedAdditionalFields && [] !== ($fields = array_diff(array_keys($additionalFields), $allowedAdditionalFields))) {
+ if (null !== $allowedAdditionalFields && [] !== ($fields = array_keys($additionalFields))) {
$this->handleNotAllowedAdditionalFields($path, $fields);
}
return $object;
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L18
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function setValue(object $object, mixed $value) : void
{
- $set = 'set' . ucfirst($this->property);
+ $set = 'set' . $this->property;
if (!method_exists($object, $set)) {
throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
}
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L20
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
$set = 'set' . ucfirst($this->property);
if (!method_exists($object, $set)) {
- throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
+ throw DeserializerLogicException::createMissingMethod($object::class, []);
}
$object->{$set}($value);
}
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L33
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function getValue(object $object)
{
- $get = 'get' . ucfirst($this->property);
+ $get = 'get' . $this->property;
$has = 'has' . ucfirst($this->property);
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L34
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
public function getValue(object $object)
{
$get = 'get' . ucfirst($this->property);
- $has = 'has' . ucfirst($this->property);
+ $has = 'has' . $this->property;
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
return $object->{$get}();
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L35
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
{
$get = 'get' . ucfirst($this->property);
$has = 'has' . ucfirst($this->property);
- $is = 'is' . ucfirst($this->property);
+ $is = 'is' . $this->property;
if (method_exists($object, $get)) {
return $object->{$get}();
}
|
PHP 8.2:
src/Accessor/MethodAccessor.php#L49
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (method_exists($object, $is)) {
return $object->{$is}();
}
- throw DeserializerLogicException::createMissingMethod($object::class, [$get, $has, $is]);
+ throw DeserializerLogicException::createMissingMethod($object::class, [$has, $is]);
}
}
|
PHP 8.2:
src/Accessor/PropertyAccessor.php#L66
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$object->__load();
}
$reflectionParentClass = (new \ReflectionObject($object))->getParentClass();
- if ($reflectionParentClass instanceof \ReflectionClass) {
+ if (true) {
return $reflectionParentClass->getName();
}
}
|
PHP 8.2:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || -1 === $errors['warning_count'] && 0 === $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.2:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || 0 === $errors['warning_count'] && -1 === $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.2:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || 0 === $errors['warning_count'] && 0 !== $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L18
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function setValue(object $object, mixed $value) : void
{
- $set = 'set' . ucfirst($this->property);
+ $set = 'set' . $this->property;
if (!method_exists($object, $set)) {
throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
}
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L20
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
{
$set = 'set' . ucfirst($this->property);
if (!method_exists($object, $set)) {
- throw DeserializerLogicException::createMissingMethod($object::class, [$set]);
+ throw DeserializerLogicException::createMissingMethod($object::class, []);
}
$object->{$set}($value);
}
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L33
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
*/
public function getValue(object $object)
{
- $get = 'get' . ucfirst($this->property);
+ $get = 'get' . $this->property;
$has = 'has' . ucfirst($this->property);
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L34
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
public function getValue(object $object)
{
$get = 'get' . ucfirst($this->property);
- $has = 'has' . ucfirst($this->property);
+ $has = 'has' . $this->property;
$is = 'is' . ucfirst($this->property);
if (method_exists($object, $get)) {
return $object->{$get}();
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L35
Escaped Mutant for Mutator "UnwrapUcFirst":
--- Original
+++ New
@@ @@
{
$get = 'get' . ucfirst($this->property);
$has = 'has' . ucfirst($this->property);
- $is = 'is' . ucfirst($this->property);
+ $is = 'is' . $this->property;
if (method_exists($object, $get)) {
return $object->{$get}();
}
|
PHP 8.3:
src/Accessor/MethodAccessor.php#L49
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
if (method_exists($object, $is)) {
return $object->{$is}();
}
- throw DeserializerLogicException::createMissingMethod($object::class, [$get, $has, $is]);
+ throw DeserializerLogicException::createMissingMethod($object::class, [$has, $is]);
}
}
|
PHP 8.3:
src/Accessor/PropertyAccessor.php#L66
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
$object->__load();
}
$reflectionParentClass = (new \ReflectionObject($object))->getParentClass();
- if ($reflectionParentClass instanceof \ReflectionClass) {
+ if (true) {
return $reflectionParentClass->getName();
}
}
|
PHP 8.3:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || -1 === $errors['warning_count'] && 0 === $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.3:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || 0 === $errors['warning_count'] && -1 === $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|
PHP 8.3:
src/Denormalizer/DateTimeImmutableFieldDenormalizer.php#L49
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
$dateTime = $dateTime->setTimezone($this->dateTimeZone);
}
$errors = \DateTimeImmutable::getLastErrors();
- if (false === $errors || 0 === $errors['warning_count'] && 0 === $errors['error_count']) {
+ if (false === $errors || 0 === $errors['warning_count'] && 0 !== $errors['error_count']) {
$value = $dateTime;
}
} catch (\Exception) {
|