Skip to content

Commit e94cef8

Browse files
committed
Split up into multi-continue
1 parent 607a941 commit e94cef8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/SitemapParser.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,12 @@ public function parseRobotstxt( string $robotstxt ): \Iterator {
290290
(array) preg_split( '/:/', $line, 2 )
291291
);
292292
// Check if the line contains a sitemap
293-
if (
294-
strtolower( $pair[0] ) !== self::XML_TAG_SITEMAP ||
295-
empty( $pair[1] )
296-
) {
297-
// Line does not contain any supported directive
293+
if ( strtolower( $pair[0] ) !== self::XML_TAG_SITEMAP ) {
294+
// Directive is not supported
295+
continue;
296+
}
297+
if ( empty( $pair[1] ) ) {
298+
// Line does not contain any directive
298299
continue;
299300
}
300301
$url = $this->urlEncode( $pair[1] );

0 commit comments

Comments
 (0)