@@ -33,7 +33,7 @@ |
||
33 | 33 | new Element('span', ['class' => 'caret']) |
34 | 34 | ]), |
35 | 35 | new Element('ul', ['class' => 'dropdown-menu'], |
36 | - array_map(function (MenuItem $item) { |
|
36 | + array_map(function(MenuItem $item) { |
|
37 | 37 | return $item->render(); |
38 | 38 | }, $this->items) |
39 | 39 | ) |
@@ -30,13 +30,13 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | $serialized = json_decode($cookies->get(self::COOKIE_NAME), true); |
33 | - return array_map(function ($item) { |
|
33 | + return array_map(function($item) { |
|
34 | 34 | return new BreadCrumb($item['caption'], $item['target']); |
35 | 35 | }, $serialized); |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function getCookie() { |
39 | - return new Cookie(self::COOKIE_NAME, json_encode(array_map(function (BreadCrumb $crumb) { |
|
39 | + return new Cookie(self::COOKIE_NAME, json_encode(array_map(function(BreadCrumb $crumb) { |
|
40 | 40 | return [ |
41 | 41 | 'target' => $crumb->getTarget(), |
42 | 42 | 'caption' => $crumb->getCaption() |
@@ -162,7 +162,7 @@ |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | private function registerDefaultAction() { |
165 | - $this->actions->add(self::INDEX_ACTION , new ListActions($this->actions, $this->groups, $this->access, $this->parser)); |
|
165 | + $this->actions->add(self::INDEX_ACTION, new ListActions($this->actions, $this->groups, $this->access, $this->parser)); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | public function prepare() { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | public function getActionsOf($group) { |
37 | 37 | $actions = array_keys($this->groups->getActionsOf($group)); |
38 | - return array_filter($this->actions, function (ActionListItem $action) use ($actions) { |
|
38 | + return array_filter($this->actions, function(ActionListItem $action) use ($actions) { |
|
39 | 39 | return in_array($action->getId(), $actions); |
40 | 40 | }); |
41 | 41 | } |
@@ -32,20 +32,20 @@ |
||
32 | 32 | /** @var ControllerCollection $controller */ |
33 | 33 | $controller = $app['controllers_factory']; |
34 | 34 | |
35 | - $controller->get('/', function (Request $request) { |
|
36 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) { |
|
35 | + $controller->get('/', function(Request $request) { |
|
36 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs, ParameterReader $reader) { |
|
37 | 37 | $execution = new ExecutionResource($this->domin, $reader, $crumbs); |
38 | 38 | return $execution->handleGet(null); |
39 | 39 | }); |
40 | 40 | }); |
41 | - $controller->get('/{action}', function (Request $request, $action) { |
|
42 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
41 | + $controller->get('/{action}', function(Request $request, $action) { |
|
42 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
43 | 43 | $execution = new ExecutionResource($this->domin, $reader, $crumbs); |
44 | 44 | return $execution->handleGet($action, $request->get(ExecutionResource::TOKEN_ARG)); |
45 | 45 | }); |
46 | 46 | }); |
47 | - $controller->post('/{action}', function (Request $request, $action) { |
|
48 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
47 | + $controller->post('/{action}', function(Request $request, $action) { |
|
48 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
49 | 49 | $execution = new ExecutionResource($this->domin, $reader, $crumbs); |
50 | 50 | return $execution->handlePost($action, $request->get(ExecutionResource::TOKEN_ARG)); |
51 | 51 | }); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | private function readCrumbs(CookieStore $cookies) { |
32 | 32 | if ($cookies->has(self::COOKIE_KEY)) { |
33 | - return array_map(function ($array) { |
|
33 | + return array_map(function($array) { |
|
34 | 34 | return new BreadCrumb($array['caption'], $array['target']); |
35 | 35 | }, $cookies->read(self::COOKIE_KEY)->payload); |
36 | 36 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | * @return BreadCrumb[] |
43 | 43 | */ |
44 | 44 | private function saveCrumbs($crumbs) { |
45 | - $this->cookies->write(new Cookie(array_map(function (BreadCrumb $crumb) { |
|
45 | + $this->cookies->write(new Cookie(array_map(function(BreadCrumb $crumb) { |
|
46 | 46 | return [ |
47 | 47 | 'caption' => $crumb->getCaption(), |
48 | 48 | 'target' => $crumb->getTarget() |
@@ -30,7 +30,7 @@ |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | public function __toString() { |
33 | - return $this->optionType . '[]'; |
|
33 | + return $this->optionType.'[]'; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
@@ -45,6 +45,6 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | public function __toString() { |
48 | - return $this->primitive . '|' . $this->target . '-ID'; |
|
48 | + return $this->primitive.'|'.$this->target.'-ID'; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -19,7 +19,7 @@ |
||
19 | 19 | public function fromFolder($path, callable $execute) { |
20 | 20 | $before = get_declared_classes(); |
21 | 21 | |
22 | - foreach (glob($path . '/*.php') as $file) { |
|
22 | + foreach (glob($path.'/*.php') as $file) { |
|
23 | 23 | include_once($file); |
24 | 24 | } |
25 | 25 |