updated composer
This commit is contained in:
32
vendor/symfony/string/Resources/functions.php
vendored
32
vendor/symfony/string/Resources/functions.php
vendored
@@ -11,22 +11,28 @@
|
||||
|
||||
namespace Symfony\Component\String;
|
||||
|
||||
function u(?string $string = ''): UnicodeString
|
||||
{
|
||||
return new UnicodeString($string ?? '');
|
||||
if (!\function_exists(u::class)) {
|
||||
function u(?string $string = ''): UnicodeString
|
||||
{
|
||||
return new UnicodeString($string ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
function b(?string $string = ''): ByteString
|
||||
{
|
||||
return new ByteString($string ?? '');
|
||||
if (!\function_exists(b::class)) {
|
||||
function b(?string $string = ''): ByteString
|
||||
{
|
||||
return new ByteString($string ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return UnicodeString|ByteString
|
||||
*/
|
||||
function s(?string $string = ''): AbstractString
|
||||
{
|
||||
$string = $string ?? '';
|
||||
if (!\function_exists(s::class)) {
|
||||
/**
|
||||
* @return UnicodeString|ByteString
|
||||
*/
|
||||
function s(?string $string = ''): AbstractString
|
||||
{
|
||||
$string = $string ?? '';
|
||||
|
||||
return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string);
|
||||
return preg_match('//u', $string) ? new UnicodeString($string) : new ByteString($string);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user