upgrade to laravel 7 and set branch to v2
This commit is contained in:
12
vendor/symfony/console/Helper/Helper.php
vendored
12
vendor/symfony/console/Helper/Helper.php
vendored
@@ -41,11 +41,9 @@ abstract class Helper implements HelperInterface
|
||||
/**
|
||||
* Returns the length of a string, using mb_strwidth if it is available.
|
||||
*
|
||||
* @param string $string The string to check its length
|
||||
*
|
||||
* @return int The length of the string
|
||||
*/
|
||||
public static function strlen($string)
|
||||
public static function strlen(?string $string)
|
||||
{
|
||||
if (false === $encoding = mb_detect_encoding($string, null, true)) {
|
||||
return \strlen($string);
|
||||
@@ -57,13 +55,9 @@ abstract class Helper implements HelperInterface
|
||||
/**
|
||||
* Returns the subset of a string, using mb_substr if it is available.
|
||||
*
|
||||
* @param string $string String to subset
|
||||
* @param int $from Start offset
|
||||
* @param int|null $length Length to read
|
||||
*
|
||||
* @return string The string subset
|
||||
*/
|
||||
public static function substr($string, $from, $length = null)
|
||||
public static function substr(string $string, int $from, int $length = null)
|
||||
{
|
||||
if (false === $encoding = mb_detect_encoding($string, null, true)) {
|
||||
return substr($string, $from, $length);
|
||||
@@ -101,7 +95,7 @@ abstract class Helper implements HelperInterface
|
||||
}
|
||||
}
|
||||
|
||||
public static function formatMemory($memory)
|
||||
public static function formatMemory(int $memory)
|
||||
{
|
||||
if ($memory >= 1024 * 1024 * 1024) {
|
||||
return sprintf('%.1f GiB', $memory / 1024 / 1024 / 1024);
|
||||
|
||||
Reference in New Issue
Block a user