Skip to content

feat: add ForbidEloquentMutationInControllersRule (queue #87) #63

feat: add ForbidEloquentMutationInControllersRule (queue #87)

feat: add ForbidEloquentMutationInControllersRule (queue #87) #63

Triggered via pull request June 1, 2026 11:47
Status Success
Total duration 3m 35s
Artifacts 4

ci.yml

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

Annotations

20 warnings
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L144
Escaped Mutant for Mutator "LogicalNot": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + || $node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L144
Escaped Mutant for Mutator "InstanceOf_": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + || $node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ if ( !$node->var instanceof PropertyFetch || !$node->var->var instanceof Variable - || $node->var->var->name !== 'this' - || !$node->var->name instanceof Identifier + || $node->var->var->name !== 'this' && !$node->var->name instanceof Identifier ) { return false; }
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable - || $node->var->var->name !== 'this' + || !$node->var->var instanceof Variable && $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) { return false;
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + !$node->var instanceof PropertyFetch && !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalNot": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch + $node->var instanceof PropertyFetch || !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "InstanceOf_": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch + $node->var instanceof PropertyFetch || !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L125
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $count = 0; $this->walkNodes($method->stmts ?? [], function(Node $node) use (&$count, $nonDatabaseProperties): void { if ( - $node instanceof MethodCall - && $node->name instanceof Identifier + ($node instanceof MethodCall || $node->name instanceof Identifier) && in_array($node->name->toString(), self::WRITE_METHODS, true) && !$this->isOnNonDatabaseProperty($node, $nonDatabaseProperties) ) {
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L94
Escaped Mutant for Mutator "LogicalOr": @@ @@ $executeMethod = $node->getMethod('execute'); - if ($executeMethod === null || $executeMethod->stmts === null) { + if ($executeMethod === null && $executeMethod->stmts === null) { return []; }
check (8.4): src/Rules/EnforceActionTransactionsRule.php#L88
Escaped Mutant for Mutator "LogicalOr": @@ @@ { $namespace = $scope->getNamespace(); - if ($namespace === null || !str_starts_with($namespace, 'App\Actions')) { + if ($namespace === null && !str_starts_with($namespace, 'App\Actions')) { return []; }
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L144
Escaped Mutant for Mutator "LogicalNot": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + || $node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L144
Escaped Mutant for Mutator "InstanceOf_": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + || $node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ if ( !$node->var instanceof PropertyFetch || !$node->var->var instanceof Variable - || $node->var->var->name !== 'this' - || !$node->var->name instanceof Identifier + || $node->var->var->name !== 'this' && !$node->var->name instanceof Identifier ) { return false; }
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ { if ( !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable - || $node->var->var->name !== 'this' + || !$node->var->var instanceof Variable && $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) { return false;
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalOr": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch - || !$node->var->var instanceof Variable + !$node->var instanceof PropertyFetch && !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier ) {
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "LogicalNot": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch + $node->var instanceof PropertyFetch || !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L143
Escaped Mutant for Mutator "InstanceOf_": @@ @@ private function isOnNonDatabaseProperty(MethodCall $node, array $nonDatabaseProperties): bool { if ( - !$node->var instanceof PropertyFetch + $node->var instanceof PropertyFetch || !$node->var->var instanceof Variable || $node->var->var->name !== 'this' || !$node->var->name instanceof Identifier
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L125
Escaped Mutant for Mutator "LogicalAnd": @@ @@ $count = 0; $this->walkNodes($method->stmts ?? [], function(Node $node) use (&$count, $nonDatabaseProperties): void { if ( - $node instanceof MethodCall - && $node->name instanceof Identifier + ($node instanceof MethodCall || $node->name instanceof Identifier) && in_array($node->name->toString(), self::WRITE_METHODS, true) && !$this->isOnNonDatabaseProperty($node, $nonDatabaseProperties) ) {
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L94
Escaped Mutant for Mutator "LogicalOr": @@ @@ $executeMethod = $node->getMethod('execute'); - if ($executeMethod === null || $executeMethod->stmts === null) { + if ($executeMethod === null && $executeMethod->stmts === null) { return []; }
check (8.5): src/Rules/EnforceActionTransactionsRule.php#L88
Escaped Mutant for Mutator "LogicalOr": @@ @@ { $namespace = $scope->getNamespace(); - if ($namespace === null || !str_starts_with($namespace, 'App\Actions')) { + if ($namespace === null && !str_starts_with($namespace, 'App\Actions')) { return []; }

Artifacts

Produced during runtime
Name Size Digest
clover-php-8.4 Expired
4.53 KB
sha256:84a6cd4b442cc35b80e9be15521f337d026fe2ec0aa3cf182dc1ee4e17e22016
clover-php-8.5 Expired
4.52 KB
sha256:53b24ab41d76361a751930fadff50bfd21bccc1183898aabb56398addd0842ef
infection-php-8.4 Expired
312 KB
sha256:8b1b083d4c05dd595aac6749887ac3efaa2fc2762affbba8dd60e289d4d821b1
infection-php-8.5 Expired
312 KB
sha256:269a93fc2d0400d8acaee4dc9f1acea5a53cb13ff2c67ce3a8bf06f5232dc5ca