Skip to content

Clean up route processing in RequestHandler#4822

Merged
TimWolla merged 11 commits intomasterfrom
requesthandler-cleanup
May 27, 2022
Merged

Clean up route processing in RequestHandler#4822
TimWolla merged 11 commits intomasterfrom
requesthandler-cleanup

Conversation

@TimWolla
Copy link
Copy Markdown
Member

No description provided.

TimWolla added 10 commits May 20, 2022 14:15
This value is currently unused, incorrectly documented (`page` was a valid
value since the addition of CMS pages), of questionable value and will break
with the addition of PSR-15 controllers.
…RequestHandler::buildRequest()

The variable is only referenced in the `else`, move it there to make the data
flow clearer.
The `redirect()` method is only called in a single location where `$controller`
will also be set to a string.
…Controller()

By returning the updated data the data flow becomes clearer.
The value is unused and badly named, because it refers to the controller name
and not the name of some page.
These array fields are never accessed after being unset.
… array

It is only interested in the className field of the given array and taking a
className directly makes the API clearer.
Since the recent changes only the `className` member of this array was access.
Simplify this to a simple `$className` variable.
It now has an explicit “then” (ACP) and “else” (Frontend) part.
@TimWolla TimWolla requested a review from dtdesign May 20, 2022 13:15
@TimWolla TimWolla merged commit e5c023d into master May 27, 2022
@TimWolla TimWolla deleted the requesthandler-cleanup branch May 27, 2022 09:06
TimWolla added a commit to WoltLab/docs.woltlab.com that referenced this pull request May 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants