@@ -5,7 +5,6 @@ |
||
| 5 | 5 | use rtens\domin\delivery\web\Element; |
| 6 | 6 | use rtens\domin\delivery\web\renderers\link\LinkPrinter; |
| 7 | 7 | use rtens\domin\delivery\web\WebRenderer; |
| 8 | -use watoki\reflect\Property; |
|
| 9 | 8 | |
| 10 | 9 | class TableRenderer implements WebRenderer { |
| 11 | 10 | |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function render($value) { |
| 29 | 29 | $delimiter = PHP_EOL; |
| 30 | 30 | |
| 31 | - return PHP_EOL . implode($delimiter, array_map(function ($item) { |
|
| 31 | + return PHP_EOL . implode($delimiter, array_map(function($item) { |
|
| 32 | 32 | return $this->renderers->getRenderer($item)->render($item); |
| 33 | 33 | }, $value)); |
| 34 | 34 | } |
@@ -25,6 +25,6 @@ |
||
| 25 | 25 | * @return mixed |
| 26 | 26 | */ |
| 27 | 27 | public function render($value) { |
| 28 | - return ($this->fileDir ? $this->fileDir . DIRECTORY_SEPARATOR : '') .$value->getName(); |
|
| 28 | + return ($this->fileDir ? $this->fileDir . DIRECTORY_SEPARATOR : '') . $value->getName(); |
|
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | \ No newline at end of file |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | * @return array|string[] |
| 42 | 42 | */ |
| 43 | 43 | public static function filter(array $headElements) { |
| 44 | - return array_values(array_unique(array_map(function (Element $element) { |
|
| 44 | + return array_values(array_unique(array_map(function(Element $element) { |
|
| 45 | 45 | return (string)$element; |
| 46 | 46 | }, $headElements))); |
| 47 | 47 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | |
| 47 | 47 | $itemParameter = $this->makeInnerParameter($parameter); |
| 48 | 48 | |
| 49 | - return $serialized->slice(1)->map(function ($item) use ($itemParameter) { |
|
| 49 | + return $serialized->slice(1)->map(function($item) use ($itemParameter) { |
|
| 50 | 50 | return $this->fields->getField($itemParameter)->inflate($itemParameter, $item); |
| 51 | 51 | })->toArray(); |
| 52 | 52 | } |
@@ -150,14 +150,14 @@ |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | private function renderAspectRatioButtons() { |
| 153 | - return array_map(function ($ratio) { |
|
| 153 | + return array_map(function($ratio) { |
|
| 154 | 154 | list($nom, $den) = $ratio; |
| 155 | 155 | return $this->renderButton("$nom:$den", "Fix aspect ratio to $nom:$den", "$(this).setOption('setAspectRatio', $nom/$den)"); |
| 156 | 156 | }, $this->getAspectRatios()); |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | 159 | private function renderRotationButtons() { |
| 160 | - return array_map(function ($angle) { |
|
| 160 | + return array_map(function($angle) { |
|
| 161 | 161 | return $this->renderButton("$angle°", "Rotate by $angle degree", "$(this).setOption('rotate', $angle)"); |
| 162 | 162 | }, $this->getRotatingAngles()); |
| 163 | 163 | } |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | $injector = new Injector(new Factory()); |
| 57 | - $instance = $injector->injectConstructor($this->getClass($parameter), $properties, function () { |
|
| 57 | + $instance = $injector->injectConstructor($this->getClass($parameter), $properties, function() { |
|
| 58 | 58 | return false; |
| 59 | 59 | }); |
| 60 | 60 | |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public function __construct($content) { |
| 16 | 16 | if (!is_callable($content)) { |
| 17 | - $content = function () use ($content) { |
|
| 17 | + $content = function() use ($content) { |
|
| 18 | 18 | return $content; |
| 19 | 19 | }; |
| 20 | 20 | } |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | public function render(WebRequest $request) { |
| 38 | - $render = function (MenuItem $item) use ($request) { |
|
| 38 | + $render = function(MenuItem $item) use ($request) { |
|
| 39 | 39 | return $item->render($request); |
| 40 | 40 | }; |
| 41 | 41 | |