We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5e9a6a commit 4b0c896Copy full SHA for 4b0c896
AbstractString.php
@@ -558,7 +558,7 @@ abstract public function trimEnd(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF
558
*/
559
public function trimPrefix($prefix): static
560
{
561
- if (\is_array($prefix) || $prefix instanceof \Traversable) {
+ if (is_iterable($prefix)) {
562
foreach ($prefix as $s) {
563
$t = $this->trimPrefix($s);
564
@@ -592,7 +592,7 @@ abstract public function trimStart(string $chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FE
592
593
public function trimSuffix($suffix): static
594
595
- if (\is_array($suffix) || $suffix instanceof \Traversable) {
+ if (is_iterable($suffix)) {
596
foreach ($suffix as $s) {
597
$t = $this->trimSuffix($s);
598
0 commit comments