feat: EnforceAuditTransactionScopeRule (ADR-0029 enforcement, queue #86) #52
Annotations
20 warnings
|
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 [];
}
|
|
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 [];
}
|
Artifacts
Produced during runtime
| Name | Size | Digest | |
|---|---|---|---|
|
clover-php-8.4
|
4.04 KB |
sha256:7d2bc9e918e61ad3bd44d7b99f3a23e5f954f9a7f906941be97d2ca27d2185af
|
|
|
clover-php-8.5
|
4.04 KB |
sha256:44739da8f6f5cdee5289a143a79c83f99eaf37a90687325bd435e4e71c978295
|
|
|
infection-php-8.4
|
281 KB |
sha256:fd0f3c177f1faf45c15dfdf22b8df934330054c070cd460836a9aa6d7cb9e58b
|
|
|
infection-php-8.5
|
280 KB |
sha256:7dcd1dad5b554cda03a01d0a948cf22e2da90e06cd5997117cece56878a47e98
|
|