Skip to content

Commit

Permalink
Add test to logical NOT operator
Browse files Browse the repository at this point in the history
  • Loading branch information
realodix committed Aug 31, 2024
1 parent 206e3db commit f2464a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/Fixtures/Ruleset/realodixspec_actual.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ public function exampleMethod(null|string|boll $a = null): null|string|boll

$c = collect(\Illuminate\Support\Facades\Route::getRoutes()->get())
->map(fn(\Illuminate\Routing\Route $route) => $route->uri)
->reject(fn($value) => !preg_match('/^[a-zA-Z\-]+$/', $value))
->unique()->sort()
->toArray();

Expand All @@ -112,6 +111,11 @@ public function exampleMethod(null|string|boll $a = null): null|string|boll
},
]);

// not_operator_with_successor_space
if (! is_int(1) || !is_string(2)) {
echo 'Help!';
}

return null;
}

Expand Down
6 changes: 5 additions & 1 deletion tests/Fixtures/Ruleset/realodixspec_expected.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ public function exampleMethod(string|boll|null $a = null): string|boll|null

$c = collect(\Illuminate\Support\Facades\Route::getRoutes()->get())
->map(fn(\Illuminate\Routing\Route $route) => $route->uri)
->reject(fn($value) => !preg_match('/^[a-zA-Z\-]+$/', $value))
->unique()->sort()
->toArray();

Expand All @@ -111,6 +110,11 @@ public function exampleMethod(string|boll|null $a = null): string|boll|null
},
]);

// not_operator_with_successor_space
if (! is_int(1) || !is_string(2)) {
echo 'Help!';
}

return null;
}

Expand Down

0 comments on commit f2464a4

Please sign in to comment.