@@ -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 | } |
@@ -28,7 +28,7 @@ |
||
28 | 28 | |
29 | 29 | if ($objects) { |
30 | 30 | $reader = new PropertyReader($types, get_class($objects[0])); |
31 | - $this->properties = $reader->readInterface($objects[0])->filter(function (Property $property) { |
|
31 | + $this->properties = $reader->readInterface($objects[0])->filter(function(Property $property) { |
|
32 | 32 | return $property->canGet(); |
33 | 33 | }); |
34 | 34 | } |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | */ |
50 | 50 | public function description() { |
51 | 51 | $lines = array_slice(explode("\n", $this->method->getDocComment()), 1, -1); |
52 | - $lines = array_map(function ($line) { |
|
52 | + $lines = array_map(function($line) { |
|
53 | 53 | return ltrim($line, ' *'); |
54 | 54 | }, $lines); |
55 | - $lines = array_filter($lines, function ($line) { |
|
55 | + $lines = array_filter($lines, function($line) { |
|
56 | 56 | return substr($line, 0, 1) != '@'; |
57 | 57 | }); |
58 | 58 | return $this->parser->parse(trim(implode("\n", $lines))); |
@@ -93,9 +93,9 @@ discard block |
||
93 | 93 | * @throws \Exception if Action cannot be executed |
94 | 94 | */ |
95 | 95 | public function execute(array $parameters) { |
96 | - $injector = function () { |
|
96 | + $injector = function() { |
|
97 | 97 | }; |
98 | - $filter = function () { |
|
98 | + $filter = function() { |
|
99 | 99 | return true; |
100 | 100 | }; |
101 | 101 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | return null; |
55 | 55 | } |
56 | 56 | |
57 | - return $this->parser->parse(implode("\n", array_map(function ($line) { |
|
57 | + return $this->parser->parse(implode("\n", array_map(function($line) { |
|
58 | 58 | return ltrim($line, " *\r\n\t"); |
59 | 59 | }, array_slice(explode("\n", $docComment), 1, -1)))); |
60 | 60 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | |
101 | 101 | protected function createInstance(array $parameters) { |
102 | 102 | $injector = new Injector(new Factory()); |
103 | - $instance = $injector->injectConstructor($this->class->name, $parameters, function () { |
|
103 | + $instance = $injector->injectConstructor($this->class->name, $parameters, function() { |
|
104 | 104 | return false; |
105 | 105 | }); |
106 | 106 |
@@ -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 |