Simplify MD_STD::startsWithAny
This commit is contained in:
parent
c689f7568f
commit
2a333c1de6
@ -163,14 +163,12 @@ final class MD_STD {
|
||||
*/
|
||||
public static function startsWithAny(string $haystack, array $needles):bool {
|
||||
|
||||
$output = false;
|
||||
foreach ($needles as $needle) {
|
||||
$output = \str_starts_with($haystack, $needle);
|
||||
if ($output == true) {
|
||||
return $output;
|
||||
if (\str_starts_with($haystack, $needle) === true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user