|
4 | 4 |
|
5 | 5 | namespace Dot\Maker\Type; |
6 | 6 |
|
| 7 | +use Dot\Maker\ColorEnum; |
7 | 8 | use Dot\Maker\IO\Output; |
| 9 | +use Dot\Maker\Message; |
8 | 10 |
|
9 | 11 | class Help extends AbstractType |
10 | 12 | { |
11 | 13 | public function __invoke(): void |
12 | 14 | { |
13 | 15 | Output::info('dot-maker'); |
14 | | - Output::writeLine(<<<HELP |
15 | | -
|
16 | | -Usage: ./vendor/bin/dot-maker <component> |
17 | | -
|
18 | | -Where <component> must be replaced with one of the following strings: |
19 | | -— collection |
20 | | -— command |
21 | | -— command |
22 | | -— entity |
23 | | -— form |
24 | | -— handler |
25 | | -— input |
26 | | -— input-filter |
27 | | -— middleware |
28 | | -— module |
29 | | -— repository |
30 | | -— service |
31 | | -HELP); |
| 16 | + Output::writeLine(); |
| 17 | + Output::writeLine( |
| 18 | + (string) (new Message('Usage: ')) |
| 19 | + ->appendLine( |
| 20 | + ColorEnum::colorize('./vendor/bin/dot-maker', ColorEnum::ForegroundBrightWhite) |
| 21 | + ) |
| 22 | + ->append(' ') |
| 23 | + ->append( |
| 24 | + ColorEnum::colorize('<component>', ColorEnum::ForegroundBrightYellow) |
| 25 | + ) |
| 26 | + ); |
| 27 | + Output::writeLine('OR'); |
| 28 | + Output::writeLine( |
| 29 | + (string) (new Message()) |
| 30 | + ->append( |
| 31 | + ColorEnum::colorize('composer make', ColorEnum::ForegroundBrightWhite) |
| 32 | + ) |
| 33 | + ->append(' ') |
| 34 | + ->append( |
| 35 | + ColorEnum::colorize('<component>', ColorEnum::ForegroundBrightYellow) |
| 36 | + ) |
| 37 | + ); |
| 38 | + Output::writeLine(); |
| 39 | + Output::writeLine( |
| 40 | + (string) (new Message('Where ')) |
| 41 | + ->append( |
| 42 | + ColorEnum::colorize('<component>', ColorEnum::ForegroundBrightYellow) |
| 43 | + ) |
| 44 | + ->append(' must be replaced with one of the following strings:') |
| 45 | + ); |
| 46 | + Output::writeLine('— collection'); |
| 47 | + Output::writeLine('— command'); |
| 48 | + Output::writeLine('— entity'); |
| 49 | + Output::writeLine('— form'); |
| 50 | + Output::writeLine('— handler'); |
| 51 | + Output::writeLine('— input'); |
| 52 | + Output::writeLine('— input-filter'); |
| 53 | + Output::writeLine('— middleware'); |
| 54 | + Output::writeLine('— module'); |
| 55 | + Output::writeLine('— repository'); |
| 56 | + Output::writeLine('— service'); |
| 57 | + Output::writeLine('— service-interface'); |
32 | 58 | } |
33 | 59 | } |
0 commit comments