Compare commits

..

1 Commits

Author SHA1 Message Date
Clemens Schwaighofer
10935214eb Fix Class file name for asymmetric anonymous encryption 2024-12-18 10:50:27 +09:00
3 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ parameters:
#friendly:
# lineBefore: 3
# lineAfter: 3
level: 8 # max is now 10
level: 8 # max is now 9
# strictRules:
# allRules: false
checkMissingCallableSignature: true

View File

@@ -46,19 +46,19 @@ class qqUploadedFileXhr implements qqUploadedFile // phpcs:ignore Squiz.Classes.
*/
public function getName(): string
{
return !empty($_GET['qqfile']) && is_string($_GET['qqfile']) ? $_GET['qqfile'] : '';
return $_GET['qqfile'] ?? '';
}
/**
* Get file size from _SERVERa array, throws an error if not possible
*
* @return int size of the file
* @return int
*
* @throws \Exception
*/
public function getSize(): int
{
if (isset($_SERVER['CONTENT_LENGTH']) && is_numeric($_SERVER['CONTENT_LENGTH'])) {
if (isset($_SERVER['CONTENT_LENGTH'])) {
return (int)$_SERVER['CONTENT_LENGTH'];
} else {
throw new \Exception('Getting content length is not supported.');