Skip to content

Commit c57fb7c

Browse files
committed
refactor: replace if with ternary operator
1 parent 6bec7f8 commit c57fb7c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

system/Filters/Filters.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,11 +562,7 @@ private function enableFilter(string $name, string $when = 'before'): void
562562
{
563563
// Normalize the arguments.
564564
[$alias, $arguments] = $this->getCleanName($name);
565-
if ($arguments === []) {
566-
$filter = $alias;
567-
} else {
568-
$filter = $alias . ':' . implode(',', $arguments);
569-
}
565+
$filter = ($arguments === []) ? $alias : $alias . ':' . implode(',', $arguments);
570566

571567
if (class_exists($alias)) {
572568
$this->config->aliases[$alias] = $alias;

0 commit comments

Comments
 (0)