Skip to content

Commit

Permalink
[10.x] refactor(Parser.php): Removing the extra "else" statement (#47483
Browse files Browse the repository at this point in the history
)

* Refactor: Reduce indent and improve code using ternary instead of 'if-else' structure

* refactor(Parser.php): Removing the "else" statement
  • Loading branch information
saMahmoudzadeh authored Jun 19, 2023
1 parent c8097ef commit 31b3d29
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Console/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,11 @@ protected static function parseOption($token)

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

$shortcut = null;

if (isset($matches[1])) {
$shortcut = $matches[0];
$token = $matches[1];
} else {
$shortcut = null;
}

switch (true) {
Expand Down

0 comments on commit 31b3d29

Please sign in to comment.