Skip to content

Commit 5178e8e

Browse files
committed
Increase tests coverage.
1 parent 3fd3392 commit 5178e8e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Importer/Text.php

+2-4
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,9 @@ private function parse(string $subject)
5555

5656
\preg_match_all('~[^\[\]]+|\[(?<nested>(?R)*)\]~', $subject, $matches);
5757

58-
if (null === $matches = \array_filter($matches['nested'])) {
59-
$matches = [];
60-
}
58+
$matches = (array) $matches['nested'];
6159

62-
foreach ($matches as $match) {
60+
foreach (\array_filter($matches) as $match) {
6361
$item = [];
6462
$position = \strpos($match, '[');
6563

0 commit comments

Comments
 (0)