Skip to content

Throw UnknownPropertyException when setting unknown property (#275) #797

Throw UnknownPropertyException when setting unknown property (#275)

Throw UnknownPropertyException when setting unknown property (#275) #797

Triggered via push December 16, 2023 05:51
Status Success
Total duration 9m 16s
Artifacts

mutation.yml

on: push
Matrix: mutation
Fit to window
Zoom out
Zoom in

Annotations

3 warnings
PHP 8-ubuntu-latest: src/BaseActiveRecordTrait.php#L207
Escaped Mutant for Mutator "ConcatOperandRemoval": --- 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 . '::'); } throw new UnknownPropertyException('Setting unknown property: ' . static::class . '::' . $name); }
PHP 8-ubuntu-latest: src/BaseActiveRecordTrait.php#L301
Escaped Mutant for Mutator "LogicalOr": --- 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, false); } public function canGetProperty(string $name, bool $checkVars = true) : bool {
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 {