Skip to content

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

Merged
kenjis merged 2 commits into
codeigniter4:developfrom
kenjis:refactor-Request-getMethod-with-strtolower
May 5, 2022
Merged

refactor: add strtolower() to Request::getMethod()#5963
kenjis merged 2 commits into
codeigniter4:developfrom
kenjis:refactor-Request-getMethod-with-strtolower

Conversation

@kenjis

@kenjis kenjis commented May 5, 2022

Copy link
Copy Markdown
Member

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

iRedds commented May 5, 2022

Copy link
Copy Markdown
Collaborator

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

kenjis commented May 5, 2022

Copy link
Copy Markdown
Member Author

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