@@ -2,6 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | namespace Tomaj\NetteApi\Presenters; |
4 | 4 | |
5 | +use Exception; |
|
5 | 6 | use Nette\Application\Responses\JsonResponse; |
6 | 7 | use Nette\Application\UI\Presenter; |
7 | 8 | use Nette\Http\Response; |
@@ -9,7 +10,6 @@ discard block |
||
9 | 10 | use Tomaj\NetteApi\ApiResponse; |
10 | 11 | use Tomaj\NetteApi\Misc\IpDetectorInterface; |
11 | 12 | use Tomaj\NetteApi\Params\ParamsProcessor; |
12 | -use Exception; |
|
13 | 13 | |
14 | 14 | class ApiPresenter extends Presenter |
15 | 15 | { |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | */ |
52 | 52 | private function getHandlersList($version) |
53 | 53 | { |
54 | - $versionHandlers = array_filter($this->apiDecider->getHandlers(), function ($handler) use ($version) { |
|
54 | + $versionHandlers = array_filter($this->apiDecider->getHandlers(), function($handler) use ($version) { |
|
55 | 55 | return $version == $handler['endpoint']->getVersion(); |
56 | 56 | }); |
57 | 57 | |
58 | - return array_map(function ($handler) { |
|
58 | + return array_map(function($handler) { |
|
59 | 59 | return [ |
60 | 60 | 'method' => $handler['endpoint']->getMethod(), |
61 | 61 | 'version' => $handler['endpoint']->getVersion(), |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | */ |
78 | 78 | private function createParamsList(ApiHandlerInterface $handler) |
79 | 79 | { |
80 | - return array_map(function (InputParam $param) { |
|
80 | + return array_map(function(InputParam $param) { |
|
81 | 81 | $parameter = [ |
82 | 82 | 'type' => $param->getType(), |
83 | 83 | 'key' => $param->getKey(), |