engineer: add LogBuilderTruncateRule (closes #8) #48
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
|
3.24 KB |
sha256:18caf61fca106d17ee08695bdd4f419943171cc525a352d0eee2505f667d53bb
|
|
|
clover-php-8.5
|
3.24 KB |
sha256:8416ddbc122e7f3067ce771d8332a4ae7443eaf47e671d0e4b6115f896c9de21
|
|
|
infection-php-8.4
|
148 KB |
sha256:0abeb283b7eb13dfaba7fe096cf01c2aaff568c9c690f963e23110803cef9cfb
|
|
|
infection-php-8.5
|
148 KB |
sha256:50b20530696683d4ba8e00bfdc35eef1444022b70c7c2a63c7b0ce88ef2f6ec4
|
|