| Conditions | 2 |
| Paths | 2 |
| Total Lines | 33 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | protected function renderTable( |
||
| 26 | OutputInterface $output, |
||
| 27 | array $fields, |
||
| 28 | string $info |
||
| 29 | ): void { |
||
| 30 | $table = new Table($output); |
||
| 31 | |||
| 32 | $rows = []; |
||
| 33 | /** @var Field $field */ |
||
| 34 | foreach ($fields as $field) { |
||
| 35 | $rows[] = [ |
||
| 36 | $field->getId(), |
||
| 37 | $field->getName(), |
||
| 38 | $field->getHandle(), |
||
| 39 | $field->getFieldType()->getType(), |
||
| 40 | (string) $field->getConfig(), |
||
| 41 | $field->getUpdated()->format('d-m-y h:i') |
||
| 42 | ]; |
||
| 43 | } |
||
| 44 | |||
| 45 | $rows[] = new TableSeparator(); |
||
| 46 | $rows[] = [ |
||
| 47 | new TableCell('<info>' . $info . '</info>', ['colspan' => 7]) |
||
| 48 | ]; |
||
| 49 | |||
| 50 | $table |
||
| 51 | ->setHeaders([ |
||
| 52 | '#id', 'name', 'handle', |
||
| 53 | 'type', 'config', 'updated' |
||
| 54 | ]) |
||
| 55 | ->setRows($rows) |
||
| 56 | ; |
||
| 57 | $table->render(); |
||
| 58 | } |
||
| 60 |