@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | $serialized = array_values($serialized); |
| 44 | 44 | $serialized = array_values(array_slice($serialized, 1)); |
| 45 | - $serialized = array_map(function ($item) use ($itemParameter) { |
|
| 45 | + $serialized = array_map(function($item) use ($itemParameter) { |
|
| 46 | 46 | return $this->fields->getField($itemParameter)->inflate($itemParameter, $item); |
| 47 | 47 | }, $serialized); |
| 48 | 48 | return $serialized; |
@@ -34,21 +34,21 @@ |
||
| 34 | 34 | /** @var ControllerCollection $controller */ |
| 35 | 35 | $controller = $app['controllers_factory']; |
| 36 | 36 | |
| 37 | - $controller->get('/', function (Request $request) { |
|
| 38 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs) { |
|
| 37 | + $controller->get('/', function(Request $request) { |
|
| 38 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs) { |
|
| 39 | 39 | $actionList = new ActionListResource($this->domin, $crumbs); |
| 40 | 40 | return $actionList->handleGet(); |
| 41 | 41 | }); |
| 42 | 42 | }); |
| 43 | - $controller->get('/{action}', function ($action, Request $request) { |
|
| 44 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
| 43 | + $controller->get('/{action}', function($action, Request $request) { |
|
| 44 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
| 45 | 45 | $execution = new ExecutionResource($this->domin, $reader, $crumbs); |
| 46 | 46 | $force = !!$request->get(ExecutionResource::FORCE_ARG, false); |
| 47 | 47 | return $execution->handleGet($action, $force); |
| 48 | 48 | }); |
| 49 | 49 | }); |
| 50 | - $controller->post('/{action}', function ($action, Request $request) { |
|
| 51 | - return $this->respond($request, function (BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
| 50 | + $controller->post('/{action}', function($action, Request $request) { |
|
| 51 | + return $this->respond($request, function(BreadCrumbsTrail $crumbs, ParameterReader $reader) use ($action, $request) { |
|
| 52 | 52 | $execution = new ExecutionResource($this->domin, $reader, $crumbs); |
| 53 | 53 | return $execution->handlePost($action); |
| 54 | 54 | }); |
@@ -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() |