Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
pull/664/head
KnifeLemon 3 weeks ago committed by GitHub
parent 106955a82e
commit 68b9306d30
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -533,7 +533,8 @@ class Request
* Parse request body data for HTTP methods that don't natively support form data (PUT, DELETE, PATCH) * Parse request body data for HTTP methods that don't natively support form data (PUT, DELETE, PATCH)
* @return void * @return void
*/ */
protected function parseRequestBodyForHttpMethods(): void { protected function parseRequestBodyForHttpMethods(): void
{
$body = $this->getBody(); $body = $this->getBody();
// Empty body // Empty body
@ -700,7 +701,7 @@ class Request
* Get the maximum file size that can be uploaded. * Get the maximum file size that can be uploaded.
* @return int The maximum file size in bytes. * @return int The maximum file size in bytes.
*/ */
protected function getUploadMaxFileSize() { protected function getUploadMaxFileSize(): int {
$value = ini_get('upload_max_filesize'); $value = ini_get('upload_max_filesize');
$unit = strtolower(preg_replace('/[^a-zA-Z]/', '', $value)); $unit = strtolower(preg_replace('/[^a-zA-Z]/', '', $value));
@ -723,7 +724,7 @@ class Request
case 'kb': case 'kb':
$value *= 1024; $value *= 1024;
case 'b': // Byte case 'b': // Byte
return $value *= 1; return (int)$value;
default: default:
return 0; return 0;
} }

Loading…
Cancel
Save