@@ -12,10 +12,10 @@ discard block |
||
12 | 12 | public function boot() |
13 | 13 | { |
14 | 14 | $this->publishes([ |
15 | - __DIR__ . '/../config/apidocs.php' => config_path('yaro.apidocs.php'), |
|
15 | + __DIR__.'/../config/apidocs.php' => config_path('yaro.apidocs.php'), |
|
16 | 16 | ], 'config'); |
17 | 17 | |
18 | - $this->app['view']->addNamespace('apidocs', __DIR__ . '/../resources/views'); |
|
18 | + $this->app['view']->addNamespace('apidocs', __DIR__.'/../resources/views'); |
|
19 | 19 | |
20 | 20 | $this->app->bind('command.apidocs:blueprint-create', BlueprintCreate::class); |
21 | 21 | $this->commands([ |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | |
26 | 26 | public function register() |
27 | 27 | { |
28 | - $configPath = __DIR__ . '/../config/apidocs.php'; |
|
28 | + $configPath = __DIR__.'/../config/apidocs.php'; |
|
29 | 29 | $this->mergeConfigFrom($configPath, 'yaro.apidocs'); |
30 | 30 | |
31 | 31 | $this->app->singleton('yaro.apidocs', function($app) { |
@@ -50,7 +50,7 @@ |
||
50 | 50 | |
51 | 51 | public function create(string $snapshotName = '', string $diskName = '') |
52 | 52 | { |
53 | - $snapshotName = $snapshotName ?: 'blueprint_'. date('Y-m-d_H-i-s'); |
|
53 | + $snapshotName = $snapshotName ?: 'blueprint_'.date('Y-m-d_H-i-s'); |
|
54 | 54 | $diskName = $diskName ?: $this->config->get('yaro.apidocs.blueprint.disc'); |
55 | 55 | |
56 | 56 | $disk = $this->getDisk($diskName); |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | private function isPrefixedRoute($route) |
106 | 106 | { |
107 | 107 | $prefix = $this->config->get('yaro.apidocs.prefix', 'api'); |
108 | - $regexp = '~^'. preg_quote($prefix) .'~'; |
|
108 | + $regexp = '~^'.preg_quote($prefix).'~'; |
|
109 | 109 | |
110 | 110 | return preg_match($regexp, $this->getRouteParam($route, 'uri')); |
111 | 111 | } // end isPrefixedRoute |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | $checkForLongDescription = true; |
140 | 140 | foreach ($docs as $line) { |
141 | 141 | if ($checkForLongDescription && !preg_match('~^@\w+~', $line)) { |
142 | - $description .= trim($line) .' '; |
|
142 | + $description .= trim($line).' '; |
|
143 | 143 | } elseif (preg_match('~^@\w+~', $line)) { |
144 | 144 | $checkForLongDescription = false; |
145 | 145 | if (preg_match('~^@param~', $line)) { |
@@ -227,7 +227,7 @@ discard block |
||
227 | 227 | $httpMethod = $this->getRouteParam($route, 'methods.0'); |
228 | 228 | $classMethod = implode('-', $this->splitCamelCaseToWords($method)); |
229 | 229 | |
230 | - $hash = $path .'::'. $httpMethod .'::'. $classMethod; |
|
230 | + $hash = $path.'::'.$httpMethod.'::'.$classMethod; |
|
231 | 231 | |
232 | 232 | return strtolower($hash); |
233 | 233 | } // end generateHashForUrl |
@@ -260,8 +260,7 @@ discard block |
||
260 | 260 | private function ins(&$ary, $keys, $val) |
261 | 261 | { |
262 | 262 | $keys ? |
263 | - $this->ins($ary[array_shift($keys)], $keys, $val) : |
|
264 | - $ary = $val; |
|
263 | + $this->ins($ary[array_shift($keys)], $keys, $val) : $ary = $val; |
|
265 | 264 | } // end ins |
266 | 265 | |
267 | 266 | private function arrayGet($array, $key, $default = null) |
@@ -275,7 +274,7 @@ discard block |
||
275 | 274 | } |
276 | 275 | |
277 | 276 | foreach (explode('.', $key) as $segment) { |
278 | - if (!is_array($array) || ! array_key_exists($segment, $array)) { |
|
277 | + if (!is_array($array) || !array_key_exists($segment, $array)) { |
|
279 | 278 | return $default; |
280 | 279 | } |
281 | 280 | $array = $array[$segment]; |