| Total Complexity | 8 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 12 | class CliConfigReader |
||
| 13 | { |
||
| 14 | public static function getArgument(InputInterface $input, string $argumentName): string |
||
| 15 | { |
||
| 16 | $value = $input->getArgument($argumentName); |
||
| 17 | Assert::string($value); |
||
| 18 | |||
| 19 | return $value; |
||
|
|
|||
| 20 | } |
||
| 21 | |||
| 22 | public static function getOption(InputInterface $input, string $optionName): ?string |
||
| 33 | } |
||
| 34 | |||
| 35 | public static function getOptionWithDefaultValue(InputInterface $input, string $optionName): string |
||
| 36 | { |
||
| 37 | $value = self::getOption($input, $optionName); |
||
| 38 | Assert::notNull($value); |
||
| 39 | |||
| 40 | return $value; |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Returns STDIN as a string. |
||
| 45 | * |
||
| 46 | * @throws SarbException |
||
| 47 | */ |
||
| 48 | public static function getStdin(InputInterface $input): string |
||
| 64 | } |
||
| 65 | |||
| 66 | public static function getBooleanOption(InputInterface $input, string $argument): bool |
||
| 74 |