@@ -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); |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | private function isPrefixedRoute($route, $routePrefix) |
| 114 | 114 | { |
| 115 | - $regexp = '~^'. preg_quote($routePrefix) .'~'; |
|
| 115 | + $regexp = '~^'.preg_quote($routePrefix).'~'; |
|
| 116 | 116 | |
| 117 | 117 | return preg_match($regexp, $this->getRouteParam($route, 'uri')); |
| 118 | 118 | } // end isPrefixedRoute |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | $checkForLongDescription = true; |
| 164 | 164 | foreach ($docs as $line) { |
| 165 | 165 | if ($checkForLongDescription && !preg_match('~^@\w+~', $line)) { |
| 166 | - $description .= trim($line) .' '; |
|
| 166 | + $description .= trim($line).' '; |
|
| 167 | 167 | } elseif (preg_match('~^@\w+~', $line)) { |
| 168 | 168 | $checkForLongDescription = false; |
| 169 | 169 | if (preg_match('~^@param~', $line)) { |
@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | $httpMethod = $this->getRouteParam($route, 'methods.0'); |
| 252 | 252 | $classMethod = implode('-', $this->splitCamelCaseToWords($method)); |
| 253 | 253 | |
| 254 | - $hash = $path .'::'. $httpMethod .'::'. $classMethod; |
|
| 254 | + $hash = $path.'::'.$httpMethod.'::'.$classMethod; |
|
| 255 | 255 | |
| 256 | 256 | return strtolower($hash); |
| 257 | 257 | } // end generateHashForUrl |
@@ -284,8 +284,7 @@ discard block |
||
| 284 | 284 | private function ins(&$ary, $keys, $val) |
| 285 | 285 | { |
| 286 | 286 | $keys ? |
| 287 | - $this->ins($ary[array_shift($keys)], $keys, $val) : |
|
| 288 | - $ary = $val; |
|
| 287 | + $this->ins($ary[array_shift($keys)], $keys, $val) : $ary = $val; |
|
| 289 | 288 | } // end ins |
| 290 | 289 | |
| 291 | 290 | private function arrayGet($array, $key, $default = null) |
@@ -299,7 +298,7 @@ discard block |
||
| 299 | 298 | } |
| 300 | 299 | |
| 301 | 300 | foreach (explode('.', $key) as $segment) { |
| 302 | - if (!is_array($array) || ! array_key_exists($segment, $array)) { |
|
| 301 | + if (!is_array($array) || !array_key_exists($segment, $array)) { |
|
| 303 | 302 | return $default; |
| 304 | 303 | } |
| 305 | 304 | $array = $array[$segment]; |