Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/5.3' into 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Sep 27, 2016
2 parents 6b76faa + 7a7ab8f commit decc107
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Illuminate/Console/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,12 @@ protected static function parameters(array $tokens)
*/
protected static function parseArgument($token)
{
$description = null;

if (Str::contains($token, ' : ')) {
list($token, $description) = explode(' : ', $token, 2);

$token = trim($token);

$description = trim($description);
} else {
$description = null;
}

switch (true) {
Expand All @@ -105,21 +103,21 @@ protected static function parseArgument($token)
*/
protected static function parseOption($token)
{
$description = null;

if (Str::contains($token, ' : ')) {
list($token, $description) = explode(' : ', $token);
$token = trim($token);
$description = trim($description);
} else {
$description = null;
}

$shortcut = null;

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

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

switch (true) {
Expand Down

0 comments on commit decc107

Please sign in to comment.