Upgrade to 3.4.3

This commit is contained in:
Bastian Allgeier
2020-09-15 10:25:09 +02:00
parent 54b9ba3047
commit d8e797dd9b
108 changed files with 1750 additions and 523 deletions

View File

@@ -179,7 +179,7 @@ class Str
$position = static::position($string, $needle, $caseInsensitive);
if ($position === false) {
return false;
return '';
} else {
return static::substr($string, $position + static::length($needle));
}
@@ -221,7 +221,7 @@ class Str
$position = static::position($string, $needle, $caseInsensitive);
if ($position === false) {
return false;
return '';
} else {
return static::substr($string, 0, $position);
}
@@ -396,7 +396,7 @@ class Str
$position = static::position($string, $needle, $caseInsensitive);
if ($position === false) {
return false;
return '';
} else {
return static::substr($string, $position);
}
@@ -748,8 +748,12 @@ class Str
* string is too long. Ellipsis is the default.
* @return string The shortened string
*/
public static function short(string $string = null, int $length = 0, string $appendix = '…'): ?string
public static function short(string $string = null, int $length = 0, string $appendix = '…'): string
{
if ($string === null) {
return '';
}
if ($length === 0) {
return $string;
}
@@ -1041,7 +1045,7 @@ class Str
$position = static::position($string, $needle, $caseInsensitive);
if ($position === false) {
return false;
return '';
} else {
return static::substr($string, 0, $position + static::length($needle));
}