| Total Complexity | 3 |
| Total Lines | 45 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class EnumsCommand extends Command |
||
| 18 | { |
||
| 19 | protected $signature = 'concord:enums'; |
||
| 20 | |||
| 21 | protected $description = 'List Enums'; |
||
| 22 | |||
| 23 | protected $headers = ['Shorthand', 'Contract', 'Concrete']; |
||
| 24 | |||
| 25 | public function handle(Concord $concord) |
||
| 26 | { |
||
| 27 | $bindings = $concord->getEnumBindings(); |
||
| 28 | |||
| 29 | if ($bindings->count()) { |
||
| 30 | $this->showBindings($bindings); |
||
| 31 | } else { |
||
| 32 | $this->line('No enums have been registered.'); |
||
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Displays the list of enum bindings on the output |
||
| 38 | * |
||
| 39 | * @param Collection $bindings |
||
| 40 | */ |
||
| 41 | protected function showBindings(Collection $bindings) |
||
| 62 | } |
||
| 63 | } |
||
| 64 |