@@ -20,13 +20,13 @@ discard block |
||
20 | 20 | $json = file_get_contents($file); |
21 | 21 | |
22 | 22 | if (!$json) { |
23 | - throw new \LogicException($file . ' can not be read'); |
|
23 | + throw new \LogicException($file.' can not be read'); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $swagger = json_decode($json); |
27 | 27 | |
28 | 28 | if (json_last_error() !== JSON_ERROR_NONE) { |
29 | - throw new \LogicException($file . ' is not a valid json file'); |
|
29 | + throw new \LogicException($file.' is not a valid json file'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | $document = new Document($swagger); |
@@ -81,12 +81,12 @@ discard block |
||
81 | 81 | function cacheRoutes(array $routes, $stream) |
82 | 82 | { |
83 | 83 | if (is_writable($stream)) { |
84 | - throw new \LogicException($stream . ' is not writable'); |
|
84 | + throw new \LogicException($stream.' is not writable'); |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | $routeResource = fopen($stream, 'w'); |
88 | 88 | |
89 | 89 | $serializedRoutes = var_export($routes, true); |
90 | 90 | |
91 | - fwrite($routeResource, '<?php return ' . $serializedRoutes . ';'); |
|
91 | + fwrite($routeResource, '<?php return '.$serializedRoutes.';'); |
|
92 | 92 | } |
@@ -56,14 +56,14 @@ |
||
56 | 56 | $paths = explode('/', $path); |
57 | 57 | // path start with a / |
58 | 58 | unset($paths[0]); |
59 | - $paths = array_map(function ($path) { |
|
59 | + $paths = array_map(function($path) { |
|
60 | 60 | return ucfirst($path); |
61 | 61 | }, $paths); |
62 | 62 | // path to 'relative' namespace |
63 | 63 | $path = implode('\\', $paths); |
64 | 64 | |
65 | - $controller = $this->namespace . $path . 'Controller'; |
|
65 | + $controller = $this->namespace.$path.'Controller'; |
|
66 | 66 | |
67 | - return ['uses' => $controller . '@' . $this->httpVerbToControllerMethod[strtoupper($operation->getMethod())], 'as' => $operation->getOperationId()]; |
|
67 | + return ['uses' => $controller.'@'.$this->httpVerbToControllerMethod[strtoupper($operation->getMethod())], 'as' => $operation->getOperationId()]; |
|
68 | 68 | } |
69 | 69 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | \Iadvize\SwaggerizeFastRoute\cacheRoutes($routes, $routeStream); |
63 | 63 | |
64 | 64 | if ($routeStream !== 'php://output') { |
65 | - $output->writeln('route file available at ' . $routeStream); |
|
65 | + $output->writeln('route file available at '.$routeStream); |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |