upgrade to laravel 7 and set branch to v2

This commit is contained in:
2020-12-25 11:22:15 +00:00
parent 516105c492
commit 0ddd298350
4638 changed files with 132501 additions and 190226 deletions

View File

@@ -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);