Skip to content

Commit 39c1270

Browse files
committed
refactor: remove Filters::enableFilter()
1 parent eca7c82 commit 39c1270

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

‎system/Filters/Filters.php‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,12 +335,8 @@ public function addFilter(string $class, ?string $alias = null, string $when = '
335335
* are passed to the filter when executed.
336336
*
337337
* @param string $name filter_name or filter_name:arguments like 'role:admin,manager'
338-
*
339-
* @return $this
340-
*
341-
* @deprecated Use enableFilters(). This method will be private.
342338
*/
343-
public function enableFilter(string $name, string $when = 'before')
339+
private function enableFilter(string $name, string $when = 'before'): void
344340
{
345341
// Get arguments and clean name
346342
[$name, $arguments] = $this->getCleanName($name);
@@ -362,8 +358,6 @@ public function enableFilter(string $name, string $when = 'before')
362358
$this->filters[$when][] = $name;
363359
$this->filtersClass[$when] = array_merge($this->filtersClass[$when], $classNames);
364360
}
365-
366-
return $this;
367361
}
368362

369363
/**

0 commit comments

Comments
 (0)