[DOCUMENTATION] Fixed type annotations and documentation of Common::size_str_to_int

This commit is contained in:
Hugo Sales 2020-06-23 21:22:27 +00:00 committed by Hugo Sales
parent b7a8861f55
commit 84be8e1711
Signed by: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
1 changed files with 2 additions and 4 deletions

View File

@ -57,13 +57,11 @@ abstract class Common
* An internal helper function that converts a $size from php.ini for
* file size limit from the 'human-readable' shorthand into a int. If
* $size is empty (the value is not set in php.ini), returns a default
* value (5000000)
*
* @param bool|string $size
* value (3M)
*
* @return int the php.ini upload limit in machine-readable format
*/
public static function size_str_to_int($size): int
public static function size_str_to_int(string $size): int
{
// `memory_limit` can be -1 and `post_max_size` can be 0
// for unlimited. Consistency.