From c1a3f285a67dfe3917ebd01f23b1b3dc3deec76f Mon Sep 17 00:00:00 2001 From: kenorb Date: Mon, 25 Sep 2017 12:26:03 +0100 Subject: [PATCH] Fixes PHP Fatal error: Cannot use Underscore\Types\String as String (GH-96) --- src/Methods/StringsMethods.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Methods/StringsMethods.php b/src/Methods/StringsMethods.php index 5d5ef6d..8b01cf6 100644 --- a/src/Methods/StringsMethods.php +++ b/src/Methods/StringsMethods.php @@ -14,7 +14,7 @@ use Doctrine\Common\Inflector\Inflector; use Patchwork\Utf8; use RuntimeException; -use Underscore\Types\Strings; +use Underscore\Types\Strings as BaseString; /** * Methods to manage strings. @@ -104,7 +104,7 @@ public static function quickRandom($length = 16) */ public static function randomStrings($words, $length = 10) { - return Strings::from('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') + return BaseString::from('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') ->shuffle() ->split($length) ->slice(0, $words)