@@ -42,7 +42,7 @@ |
||
| 42 | 42 | { |
| 43 | 43 | $flattenedRendererList = array_reduce( |
| 44 | 44 | $this->rendererList, |
| 45 | - function ($carry, $item) { |
|
| 45 | + function($carry, $item) { |
|
| 46 | 46 | return array_merge($carry, $item); |
| 47 | 47 | }, |
| 48 | 48 | [] |
@@ -19,7 +19,7 @@ |
||
| 19 | 19 | * transformation object. |
| 20 | 20 | * |
| 21 | 21 | * @param FormatterOptions $options Options that affect output formatting. |
| 22 | - * @return Consolidation\OutputFormatters\Transformations\TableTransformation |
|
| 22 | + * @return TableTransformation |
|
| 23 | 23 | */ |
| 24 | 24 | public function restructure(FormatterOptions $options) |
| 25 | 25 | { |
@@ -2,9 +2,6 @@ |
||
| 2 | 2 | namespace Consolidation\OutputFormatters\StructuredData; |
| 3 | 3 | |
| 4 | 4 | use Consolidation\OutputFormatters\FormatterOptions; |
| 5 | -use Consolidation\OutputFormatters\StructuredData\ListDataInterface; |
|
| 6 | -use Consolidation\OutputFormatters\Transformations\PropertyParser; |
|
| 7 | -use Consolidation\OutputFormatters\Transformations\ReorderFields; |
|
| 8 | 5 | use Consolidation\OutputFormatters\Transformations\TableTransformation; |
| 9 | 6 | |
| 10 | 7 | /** |
@@ -260,7 +260,7 @@ |
||
| 260 | 260 | protected static function longestWordLength($str) |
| 261 | 261 | { |
| 262 | 262 | $words = preg_split('/[ -]/', $str); |
| 263 | - $lengths = array_map(function ($s) { |
|
| 263 | + $lengths = array_map(function($s) { |
|
| 264 | 264 | return strlen($s); |
| 265 | 265 | }, $words); |
| 266 | 266 | return max($lengths); |
@@ -123,6 +123,7 @@ |
||
| 123 | 123 | |
| 124 | 124 | /** |
| 125 | 125 | * Add our custom table style(s) to the table. |
| 126 | + * @param Table $table |
|
| 126 | 127 | */ |
| 127 | 128 | protected static function addCustomTableStyles($table) |
| 128 | 129 | { |
@@ -4,12 +4,10 @@ |
||
| 4 | 4 | use Symfony\Component\Console\Output\OutputInterface; |
| 5 | 5 | use Symfony\Component\Console\Helper\Table; |
| 6 | 6 | use Symfony\Component\Console\Helper\TableStyle; |
| 7 | - |
|
| 8 | 7 | use Consolidation\OutputFormatters\Validate\ValidDataTypesInterface; |
| 9 | 8 | use Consolidation\OutputFormatters\Options\FormatterOptions; |
| 10 | 9 | use Consolidation\OutputFormatters\Validate\ValidDataTypesTrait; |
| 11 | 10 | use Consolidation\OutputFormatters\StructuredData\TableDataInterface; |
| 12 | -use Consolidation\OutputFormatters\Transformations\ReorderFields; |
|
| 13 | 11 | use Consolidation\OutputFormatters\Exception\IncompatibleDataException; |
| 14 | 12 | use Consolidation\OutputFormatters\Transformations\WordWrapper; |
| 15 | 13 | |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | if (!empty($headers)) { |
| 90 | 90 | array_splice($headers, 1, 0, ':'); |
| 91 | 91 | } |
| 92 | - $data = array_map(function ($item) { |
|
| 92 | + $data = array_map(function($item) { |
|
| 93 | 93 | array_splice($item, 1, 0, ':'); |
| 94 | 94 | return $item; |
| 95 | 95 | }, $data); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | $wrapper = new WordWrapper($options->get(FormatterOptions::TERMINAL_WIDTH)); |
| 117 | 117 | $wrapper->setPaddingFromStyle($tableStyle); |
| 118 | 118 | if (!empty($headers)) { |
| 119 | - $headerLengths = array_map(function ($item) { |
|
| 119 | + $headerLengths = array_map(function($item) { |
|
| 120 | 120 | return strlen($item); |
| 121 | 121 | }, $headers); |
| 122 | 122 | $wrapper->setMinimumWidths($headerLengths); |