[DOCUMENTATION] Fixed type annotations and documentation of Common::size_str_to_int
This commit is contained in:
parent
b7a8861f55
commit
84be8e1711
@ -57,13 +57,11 @@ abstract class Common
|
|||||||
* An internal helper function that converts a $size from php.ini for
|
* An internal helper function that converts a $size from php.ini for
|
||||||
* file size limit from the 'human-readable' shorthand into a int. If
|
* 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
|
* $size is empty (the value is not set in php.ini), returns a default
|
||||||
* value (5000000)
|
* value (3M)
|
||||||
*
|
|
||||||
* @param bool|string $size
|
|
||||||
*
|
*
|
||||||
* @return int the php.ini upload limit in machine-readable format
|
* @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
|
// `memory_limit` can be -1 and `post_max_size` can be 0
|
||||||
// for unlimited. Consistency.
|
// for unlimited. Consistency.
|
||||||
|
Loading…
Reference in New Issue
Block a user