@@ -30,7 +30,7 @@ |
||
| 30 | 30 | } |
| 31 | 31 | return [ |
| 32 | 32 | "labels" => $this->makeLabels(), |
| 33 | - "datasets" => array_map(function (DataSet $set) { |
|
| 33 | + "datasets" => array_map(function(DataSet $set) { |
|
| 34 | 34 | return array_merge( |
| 35 | 35 | [ |
| 36 | 36 | "label" => $set->getLabel(), |
@@ -46,11 +46,11 @@ |
||
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | public function data() { |
| 49 | - return array_map(function (ScatterDataSet $data) { |
|
| 49 | + return array_map(function(ScatterDataSet $data) { |
|
| 50 | 50 | return array_merge( |
| 51 | 51 | [ |
| 52 | 52 | 'label' => $data->getLabel(), |
| 53 | - 'data' => array_map(function (ScatterDataPoint $point) { |
|
| 53 | + 'data' => array_map(function(ScatterDataPoint $point) { |
|
| 54 | 54 | return [ |
| 55 | 55 | 'x' => $point->getX(), |
| 56 | 56 | 'y' => $point->getY(), |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @return Element |
| 23 | 23 | */ |
| 24 | 24 | public function render(RendererRegistry $renderers) { |
| 25 | - return new Element('div', [], array_map(function (Row $row) use ($renderers) { |
|
| 25 | + return new Element('div', [], array_map(function(Row $row) use ($renderers) { |
|
| 26 | 26 | return $row->render($renderers); |
| 27 | 27 | }, $this->rows)); |
| 28 | 28 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | * @return Element |
| 23 | 23 | */ |
| 24 | 24 | public function render(RendererRegistry $renderers) { |
| 25 | - return new Element('div', ['class' => 'row'], array_map(function (Column $column) use ($renderers) { |
|
| 25 | + return new Element('div', ['class' => 'row'], array_map(function(Column $column) use ($renderers) { |
|
| 26 | 26 | return $column->render($renderers); |
| 27 | 27 | }, $this->columns)); |
| 28 | 28 | } |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $caption, |
| 68 | 68 | new Element('span', ['class' => 'caret']) |
| 69 | 69 | ]), |
| 70 | - new Element('ul', ['class' => 'dropdown-menu'], array_map(function (Element $element) { |
|
| 70 | + new Element('ul', ['class' => 'dropdown-menu'], array_map(function(Element $element) { |
|
| 71 | 71 | return new Element('li', [], [$element]); |
| 72 | 72 | }, $links)) |
| 73 | 73 | ]) |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | private function createLinks($object, $classes = '') { |
| 78 | - return array_map(function (Link $link) use ($object, $classes) { |
|
| 78 | + return array_map(function(Link $link) use ($object, $classes) { |
|
| 79 | 79 | $action = $this->actions->getAction($link->actionId()); |
| 80 | 80 | |
| 81 | 81 | $url = $this->baseUrl->appended($link->actionId())->withParameters(new Map($link->parameters($object))); |
@@ -11,7 +11,7 @@ |
||
| 11 | 11 | * @return array|Link[] |
| 12 | 12 | */ |
| 13 | 13 | public function getLinks($object) { |
| 14 | - return array_filter($this->links, function (Link $link) use ($object) { |
|
| 14 | + return array_filter($this->links, function(Link $link) use ($object) { |
|
| 15 | 15 | return $link->handles($object); |
| 16 | 16 | }); |
| 17 | 17 | } |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | * @param callable|null $parameters |
| 10 | 10 | */ |
| 11 | 11 | public function __construct($class, $actionId, callable $parameters = null) { |
| 12 | - parent::__construct($actionId, function ($object) use ($class) { |
|
| 12 | + parent::__construct($actionId, function($object) use ($class) { |
|
| 13 | 13 | return is_a($object, $class); |
| 14 | 14 | }, $parameters); |
| 15 | 15 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function __construct($actionId, callable $handles, callable $parameters = null) { |
| 14 | 14 | $this->actionId = $actionId; |
| 15 | 15 | $this->handles = $handles; |
| 16 | - $this->parameters = $parameters ?: function () { |
|
| 16 | + $this->parameters = $parameters ?: function() { |
|
| 17 | 17 | return []; |
| 18 | 18 | }; |
| 19 | 19 | } |
@@ -11,9 +11,9 @@ |
||
| 11 | 11 | * @param string $identifierKey |
| 12 | 12 | */ |
| 13 | 13 | public function __construct($target, $actionId, $identifierKey) { |
| 14 | - parent::__construct($actionId, function ($object) { |
|
| 14 | + parent::__construct($actionId, function($object) { |
|
| 15 | 15 | return $object instanceof Identifier; |
| 16 | - }, function (Identifier $object) use ($identifierKey) { |
|
| 16 | + }, function(Identifier $object) use ($identifierKey) { |
|
| 17 | 17 | return [$identifierKey => $object->getId()]; |
| 18 | 18 | }); |
| 19 | 19 | } |