Skip to content

Commit

Permalink
refactor: remove meaningless code
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Oct 18, 2023
1 parent 9df7a7e commit d43d1dc
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions system/Filters/Filters.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,7 @@ public function run(string $uri, string $position = 'before')
$this->initialize(strtolower($uri));

if ($position === 'before') {
$result = $this->runBefore($this->filtersClass[$position]);

// If the response object was sent back,
// then send it and quit.
if ($result instanceof ResponseInterface) {
// short circuit - bypass any other filters
return $result;
}

return $result;
return $this->runBefore($this->filtersClass[$position]);
}

// After
Expand Down Expand Up @@ -303,16 +294,7 @@ public function runRequired(string $position = 'before')
}

if ($position === 'before') {
$result = $this->runBefore($filterClasses[$position]);

// If the response object was sent back,
// then send it and quit.
if ($result instanceof ResponseInterface) {
// short circuit - bypass any other filters
return $result;
}

return $result;
return $this->runBefore($filterClasses[$position]);
}

// After
Expand Down

0 comments on commit d43d1dc

Please sign in to comment.