Skip to content

Commit 31b3d29

Browse files
[10.x] refactor(Parser.php): Removing the extra "else" statement (#47483)
* Refactor: Reduce indent and improve code using ternary instead of 'if-else' structure * refactor(Parser.php): Removing the "else" statement
1 parent c8097ef commit 31b3d29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Console/Parser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ protected static function parseOption($token)
105105

106106
$matches = preg_split('/\s*\|\s*/', $token, 2);
107107

108+
$shortcut = null;
109+
108110
if (isset($matches[1])) {
109111
$shortcut = $matches[0];
110112
$token = $matches[1];
111-
} else {
112-
$shortcut = null;
113113
}
114114

115115
switch (true) {

0 commit comments

Comments
 (0)