Skip to content

Commit c8a1981

Browse files
committed
fix
1 parent 65a6e03 commit c8a1981

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/Laravel/Filter/SupportsOperators.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@ trait SupportsOperators
88
{
99
protected array $operators = self::SUPPORTED_OPERATORS;
1010

11-
public function operators(array $only = null): static
11+
public function operators(array $only): static
1212
{
13-
$supported = static::SUPPORTED_OPERATORS;
14-
15-
if ($only === null) {
16-
return $supported;
17-
}
18-
19-
$invalid = array_diff($only, $supported);
13+
$invalid = array_diff($only, static::SUPPORTED_OPERATORS);
2014

2115
if (!empty($invalid)) {
2216
throw new InvalidArgumentException(

0 commit comments

Comments
 (0)