Skip to content

Commit b81cea3

Browse files
committed
Get rid of "else" statements.
1 parent 9974dd9 commit b81cea3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Parsers/AbstractParser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ protected function trimDelimeters(Cursor $cursor, int $start, int $end): ?array
5454
}
5555

5656
$end--;
57-
} else {
58-
break;
57+
58+
continue;
5959
}
60+
61+
break;
6062
}
6163

6264
if ($end === $start) {

src/Parsers/UrlParser.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ public function parse(Cursor $cursor): ?Link
5454
while ($start > 0) {
5555
if (ctype_alpha($cursor->getCharacter($start - 1))) {
5656
$start--;
57-
} else {
58-
break;
57+
58+
continue;
5959
}
60+
61+
break;
6062
}
6163

6264
if ( ! $this->validateProtocol($cursor, $start)) {

0 commit comments

Comments
 (0)