Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: add strtolower() to Request::getMethod() #5963

Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented May 5, 2022

Description
Supersedes #5766

The $upper functionality will be removed.

Checklist:

  • Securely signed commits
  • [] Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • [] User guide updated
  • Conforms to style guide

kenjis added 2 commits May 5, 2022 10:17
The $upper functionality will be removed.
The $upper functionality will be removed.
@kenjis kenjis added the refactor Pull requests that refactor code label May 5, 2022
@kenjis kenjis merged commit 8178bda into codeigniter4:develop May 5, 2022
@kenjis kenjis deleted the refactor-Request-getMethod-with-strtolower branch May 5, 2022 04:06
@iRedds
Copy link
Collaborator

iRedds commented May 5, 2022

Why did you choose the strtolower function instead of the strtoupper function?
As far as I know, 'REQUEST_METHOD' returns a value in upper case.
The strtoupper function can be used in fewer cases, only where we do not control the value of the method.

@kenjis
Copy link
Member Author

kenjis commented May 5, 2022

I chose strtolower() or strtoupper() to fit the current implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants