@@ -66,7 +66,9 @@ |
||
| 66 | 66 | |
| 67 | 67 | $prefix = $input->getOption('prefix'); |
| 68 | 68 | |
| 69 | - if ($prefix) $prefix = $prefix . RepositoryCollection::COMMAND_SEPARATOR; |
|
| 69 | + if ($prefix) { |
|
| 70 | + $prefix = $prefix . RepositoryCollection::COMMAND_SEPARATOR; |
|
| 71 | + } |
|
| 70 | 72 | |
| 71 | 73 | foreach ($commands as $command) { |
| 72 | 74 | |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | } |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - uasort($commands, function (Command $a, Command $b) { |
|
| 53 | + uasort($commands, function(Command $a, Command $b) { |
|
| 54 | 54 | return $a->getFullyQualifiedIdentifier() <=> $b->getFullyQualifiedIdentifier(); |
| 55 | 55 | }); |
| 56 | 56 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | |
| 52 | 52 | $process = Process::fromShellCommandline($prompt); |
| 53 | 53 | |
| 54 | - $process->run(function (string $pipe, string $outputString) use ($output) { |
|
| 54 | + $process->run(function(string $pipe, string $outputString) use ($output) { |
|
| 55 | 55 | if ($pipe == Process::OUT) { |
| 56 | 56 | $output->write($outputString); |
| 57 | 57 | } elseif ($pipe == Process::ERR) { |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | if (array_key_exists(self::FIELD_DESCRIPTION, $config['repository'])) { |
| 44 | - $this->description = $config['repository'][self::FIELD_DESCRIPTION] . ' (' . self::DEFAULT_LOCAL_DESCRIPTION . ')'; |
|
| 44 | + $this->description = $config['repository'][self::FIELD_DESCRIPTION] . ' (' . self::DEFAULT_LOCAL_DESCRIPTION . ')'; |
|
| 45 | 45 | } else { |
| 46 | 46 | $this->description = ucfirst(self::DEFAULT_LOCAL_DESCRIPTION); |
| 47 | 47 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | throw new \RuntimeException('The given YAML file does not contain a section named "' . self::YAML_FIELD_COMMANDS . '".'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if(is_null($config[self::YAML_FIELD_COMMANDS])) return []; |
|
| 62 | + if (is_null($config[self::YAML_FIELD_COMMANDS])) return []; |
|
| 63 | 63 | |
| 64 | 64 | foreach ($config[self::YAML_FIELD_COMMANDS] as $identifier => $commandConfig) { |
| 65 | 65 | if (!array_key_exists(self::YAML_FIELD_PROMPT, $commandConfig)) { |
@@ -59,7 +59,9 @@ |
||
| 59 | 59 | throw new \RuntimeException('The given YAML file does not contain a section named "' . self::YAML_FIELD_COMMANDS . '".'); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - if(is_null($config[self::YAML_FIELD_COMMANDS])) return []; |
|
| 62 | + if(is_null($config[self::YAML_FIELD_COMMANDS])) { |
|
| 63 | + return []; |
|
| 64 | + } |
|
| 63 | 65 | |
| 64 | 66 | foreach ($config[self::YAML_FIELD_COMMANDS] as $identifier => $commandConfig) { |
| 65 | 67 | if (!array_key_exists(self::YAML_FIELD_PROMPT, $commandConfig)) { |