Skip to content

Update the comments of the method createQueryTo in ActiveRecordFactory so that the IDE can automatically identify the specific class of ActiveRecord #846

Update the comments of the method createQueryTo in ActiveRecordFactory so that the IDE can automatically identify the specific class of ActiveRecord

Update the comments of the method createQueryTo in ActiveRecordFactory so that the IDE can automatically identify the specific class of ActiveRecord #846

Triggered via pull request January 2, 2024 09:17
@niqingyangniqingyang
synchronize #280
master
Status Success
Total duration 15m 9s
Artifacts

mutation.yml

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

Annotations

3 warnings
PHP 8-ubuntu-latest: src/ActiveRelationTrait.php#L253
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ if ($this->via instanceof self) { $viaQuery = $this->via; $viaModels = $viaQuery->findJunctionRows($primaryModels); - $this->filterByModels($viaModels); + } elseif (is_array($this->via)) { [$viaName, $viaQuery] = $this->via; if ($viaQuery->asArray === null) {
PHP 8-ubuntu-latest: src/ActiveRelationTrait.php#L368
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ */ private function populateInverseRelation(array &$primaryModels, array $models, string $primaryName, string $name) : void { - if (empty($models) || empty($primaryModels)) { + if (empty($models) && empty($primaryModels)) { return; } $model = reset($models);
PHP 8-ubuntu-latest: src/ActiveRelationTrait.php#L387
Escaped Mutant for Mutator "InstanceOf_": --- Original +++ New @@ @@ if ($model instanceof ActiveRecordInterface) { foreach ($models as $model) { $key = $this->getModelKey($model, $relation->getLink()); - if ($model instanceof ActiveRecordInterface) { + if (true) { $model->populateRelation($name, $buckets[$key] ?? []); } }