mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 05:38:39 +00:00
Cast string to array
This commit is contained in:
parent
9dde2dfa72
commit
60aebf57a8
|
|
@ -53,7 +53,7 @@ class StringUtils
|
||||||
public static function endsWith(string $haystack, $needles) : bool
|
public static function endsWith(string $haystack, $needles) : bool
|
||||||
{
|
{
|
||||||
if (is_string($needles)) {
|
if (is_string($needles)) {
|
||||||
self::endsWith($haystack, [$needles]);
|
$needles = [$needles];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($needles as $needle) {
|
foreach ($needles as $needle) {
|
||||||
|
|
@ -79,7 +79,7 @@ class StringUtils
|
||||||
public static function startsWith(string $haystack, $needles) : bool
|
public static function startsWith(string $haystack, $needles) : bool
|
||||||
{
|
{
|
||||||
if (is_string($needles)) {
|
if (is_string($needles)) {
|
||||||
self::startsWith($haystack, [$needles]);
|
$needles = [$needles];
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($needles as $needle) {
|
foreach ($needles as $needle) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user