Refactor BaseActiveRecord::getDirtyAttributes()
#820
Annotations
3 warnings
PHP 8-ubuntu-latest:
src/BaseActiveRecordTrait.php#L207
Escaped Mutant for Mutator "Concat":
--- Original
+++ New
@@ @@
return;
}
if (method_exists($this, 'get' . ucfirst($name))) {
- throw new InvalidCallException('Setting read-only property: ' . static::class . '::' . $name);
+ throw new InvalidCallException('Setting read-only property: ' . '::' . static::class . $name);
}
throw new UnknownPropertyException('Setting unknown property: ' . static::class . '::' . $name);
}
|
PHP 8-ubuntu-latest:
src/BaseActiveRecordTrait.php#L302
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*/
public function hasProperty(string $name, bool $checkVars = true) : bool
{
- return $this->canGetProperty($name, $checkVars) || $this->canSetProperty($name, false);
+ return $this->canGetProperty($name, $checkVars) || $this->canSetProperty($name, true);
}
public function canGetProperty(string $name, bool $checkVars = true) : bool
{
|
PHP 8-ubuntu-latest:
src/BaseActiveRecordTrait.php#L305
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
{
return $this->canGetProperty($name, $checkVars) || $this->canSetProperty($name, false);
}
- public function canGetProperty(string $name, bool $checkVars = true) : bool
+ public function canGetProperty(string $name, bool $checkVars = false) : bool
{
if (method_exists($this, 'get' . ucfirst($name)) || $checkVars && property_exists($this, $name)) {
return true;
|