Skip to content

Commit f3c7828

Browse files
authored
Merge pull request #964 from kosarinin/allowed-filter-should-return-static
AllowedFilter should return static rather than self
2 parents fb28926 + 0eb7bcc commit f3c7828

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/AllowedFilter.php

+12-12
Original file line numberDiff line numberDiff line change
@@ -52,54 +52,54 @@ public static function setFilterArrayValueDelimiter(string $delimiter = null): v
5252
}
5353
}
5454

55-
public static function exact(string $name, ?string $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): self
55+
public static function exact(string $name, ?string $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): static
5656
{
5757
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
5858

5959
return new static($name, new FiltersExact($addRelationConstraint), $internalName);
6060
}
6161

62-
public static function partial(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): self
62+
public static function partial(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): static
6363
{
6464
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
6565

6666
return new static($name, new FiltersPartial($addRelationConstraint), $internalName);
6767
}
6868

69-
public static function beginsWithStrict(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): self
69+
public static function beginsWithStrict(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): static
7070
{
7171
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
7272

7373
return new static($name, new FiltersBeginsWithStrict($addRelationConstraint), $internalName);
7474
}
7575

76-
public static function endsWithStrict(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): self
76+
public static function endsWithStrict(string $name, $internalName = null, bool $addRelationConstraint = true, string $arrayValueDelimiter = null): static
7777
{
7878
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
7979

8080
return new static($name, new FiltersEndsWithStrict($addRelationConstraint), $internalName);
8181
}
8282

83-
public static function scope(string $name, $internalName = null, string $arrayValueDelimiter = null): self
83+
public static function scope(string $name, $internalName = null, string $arrayValueDelimiter = null): static
8484
{
8585
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
8686

8787
return new static($name, new FiltersScope(), $internalName);
8888
}
8989

90-
public static function callback(string $name, $callback, $internalName = null, string $arrayValueDelimiter = null): self
90+
public static function callback(string $name, $callback, $internalName = null, string $arrayValueDelimiter = null): static
9191
{
9292
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
9393

9494
return new static($name, new FiltersCallback($callback), $internalName);
9595
}
9696

97-
public static function trashed(string $name = 'trashed', $internalName = null): self
97+
public static function trashed(string $name = 'trashed', $internalName = null): static
9898
{
9999
return new static($name, new FiltersTrashed(), $internalName);
100100
}
101101

102-
public static function custom(string $name, Filter $filterClass, $internalName = null, string $arrayValueDelimiter = null): self
102+
public static function custom(string $name, Filter $filterClass, $internalName = null, string $arrayValueDelimiter = null): static
103103
{
104104
static::setFilterArrayValueDelimiter($arrayValueDelimiter);
105105

@@ -121,7 +121,7 @@ public function isForFilter(string $filterName): bool
121121
return $this->name === $filterName;
122122
}
123123

124-
public function ignore(...$values): self
124+
public function ignore(...$values): static
125125
{
126126
$this->ignored = $this->ignored
127127
->merge($values)
@@ -140,7 +140,7 @@ public function getInternalName(): string
140140
return $this->internalName;
141141
}
142142

143-
public function default($value): self
143+
public function default($value): static
144144
{
145145
$this->hasDefault = true;
146146
$this->default = $value;
@@ -162,14 +162,14 @@ public function hasDefault(): bool
162162
return $this->hasDefault;
163163
}
164164

165-
public function nullable(bool $nullable = true): self
165+
public function nullable(bool $nullable = true): static
166166
{
167167
$this->nullable = $nullable;
168168

169169
return $this;
170170
}
171171

172-
public function unsetDefault(): self
172+
public function unsetDefault(): static
173173
{
174174
$this->hasDefault = false;
175175
unset($this->default);

0 commit comments

Comments
 (0)