@@ -39,9 +39,9 @@ discard block |
||
39 | 39 | $swagger = $this->getSwagger(); |
40 | 40 | |
41 | 41 | $response = new Response( |
42 | - $swagger, |
|
43 | - Response::HTTP_OK, |
|
44 | - ['Content-Type' => 'application/json'] |
|
42 | + $swagger, |
|
43 | + Response::HTTP_OK, |
|
44 | + ['Content-Type' => 'application/json'] |
|
45 | 45 | ); |
46 | 46 | $response->setCache($cache); |
47 | 47 | $response->setEtag(md5($swagger)); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | public function getSwagger() |
56 | 56 | { |
57 | 57 | $swagger = \Swagger\scan($this->config->getBasePath(), |
58 | - $this->config->getScanOptions()); |
|
58 | + $this->config->getScanOptions()); |
|
59 | 59 | return $swagger; |
60 | 60 | } |
61 | 61 | } |
@@ -22,11 +22,11 @@ discard block |
||
22 | 22 | |
23 | 23 | $app[self::SWAGGER_CONFIG] = $app::share(function (Application $app) { |
24 | 24 | return new SwaggerConfig( |
25 | - $app[self::SWAGGER_SERVICE_PATH], |
|
26 | - $app[self::SWAGGER_ANALYSER], |
|
27 | - $app[self::SWAGGER_ANALYSIS], |
|
28 | - $app[self::SWAGGER_PROCESSORS], |
|
29 | - $app[self::SWAGGER_EXCLUDE_PATH] |
|
25 | + $app[self::SWAGGER_SERVICE_PATH], |
|
26 | + $app[self::SWAGGER_ANALYSER], |
|
27 | + $app[self::SWAGGER_ANALYSIS], |
|
28 | + $app[self::SWAGGER_PROCESSORS], |
|
29 | + $app[self::SWAGGER_EXCLUDE_PATH] |
|
30 | 30 | ); |
31 | 31 | }); |
32 | 32 | |
@@ -45,13 +45,13 @@ discard block |
||
45 | 45 | public function boot(Application $app) |
46 | 46 | { |
47 | 47 | $app->get($app[self::SWAGGER_API_DOC_PATH], |
48 | - function (Application $app, Request $request) { |
|
49 | - /** @var SwaggerService $swagger */ |
|
50 | - $swagger = $app[self::SWAGGER_SERVICE]; |
|
51 | - $response = $swagger->getSwaggerResponse($app[self::SWAGGER_CACHE]); |
|
52 | - $response->isNotModified($request); |
|
53 | - |
|
54 | - return $response; |
|
55 | - }); |
|
48 | + function (Application $app, Request $request) { |
|
49 | + /** @var SwaggerService $swagger */ |
|
50 | + $swagger = $app[self::SWAGGER_SERVICE]; |
|
51 | + $response = $swagger->getSwaggerResponse($app[self::SWAGGER_CACHE]); |
|
52 | + $response->isNotModified($request); |
|
53 | + |
|
54 | + return $response; |
|
55 | + }); |
|
56 | 56 | } |
57 | 57 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $app[self::SWAGGER_ANALYSIS] = null; |
21 | 21 | $app[self::SWAGGER_PROCESSORS] = []; |
22 | 22 | |
23 | - $app[self::SWAGGER_CONFIG] = $app::share(function (Application $app) { |
|
23 | + $app[self::SWAGGER_CONFIG] = $app::share(function(Application $app) { |
|
24 | 24 | return new SwaggerConfig( |
25 | 25 | $app[self::SWAGGER_SERVICE_PATH], |
26 | 26 | $app[self::SWAGGER_ANALYSER], |
@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | ); |
31 | 31 | }); |
32 | 32 | |
33 | - $app[self::SWAGGER_SERVICE] = $app::share(function (Application $app) { |
|
33 | + $app[self::SWAGGER_SERVICE] = $app::share(function(Application $app) { |
|
34 | 34 | return new SwaggerService($app[self::SWAGGER_CONFIG]); |
35 | 35 | }); |
36 | 36 | |
37 | - $app[self::SWAGGER] = $app::share(function (Application $app) { |
|
37 | + $app[self::SWAGGER] = $app::share(function(Application $app) { |
|
38 | 38 | /** @var SwaggerService $swagger */ |
39 | 39 | $swagger = $app[self::SWAGGER_SERVICE]; |
40 | 40 | return $swagger->getSwagger(); |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function boot(Application $app) |
46 | 46 | { |
47 | 47 | $app->get($app[self::SWAGGER_API_DOC_PATH], |
48 | - function (Application $app, Request $request) { |
|
48 | + function(Application $app, Request $request) { |
|
49 | 49 | /** @var SwaggerService $swagger */ |
50 | 50 | $swagger = $app[self::SWAGGER_SERVICE]; |
51 | 51 | $response = $swagger->getSwaggerResponse($app[self::SWAGGER_CACHE]); |