refactor(rector): update contributor controller's remap logic

This commit is contained in:
Yassine Doghri 2021-06-09 12:47:08 +00:00
parent 92536ddb38
commit cc9e4c7dc7
No known key found for this signature in database
GPG Key ID: 3E7F89498B960C9F
1 changed files with 7 additions and 6 deletions

View File

@ -37,14 +37,15 @@ class ContributorController extends BaseController
$this->podcast = $podcast;
if (
count($params) > 1 &&
($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) === null
) {
throw PageNotFoundException::forPageNotFound();
if (count($params) <= 1) {
return $this->{$method}();
}
return $this->{$method}();
if (($this->user = (new UserModel())->getPodcastContributor((int) $params[1], (int) $params[0])) !== null) {
return $this->{$method}();
}
throw PageNotFoundException::forPageNotFound();
}
public function list(): string