Completed
Push — master ( 0d17ec...34df22 )
by Yaro
02:05
created
src/Blueprint.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -32,6 +32,9 @@
 block discarded – undo
32 32
         $this->endpoints = $endpoints;
33 33
     }
34 34
     
35
+    /**
36
+     * @return string
37
+     */
35 38
     public function render()
36 39
     {
37 40
         $host = $this->config->get('yaro.apidocs.blueprint.host');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
config/apidocs.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * API Blueprint related data.
31 31
      */
32
-     'blueprint' => [
32
+        'blueprint' => [
33 33
      
34 34
         'host' => null,
35 35
         
@@ -39,6 +39,6 @@  discard block
 block discarded – undo
39 39
         'reference_delimiter' => ' / ',
40 40
         'disc' => 'apidocs',
41 41
         
42
-     ]
42
+        ]
43 43
 
44 44
 ];
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -12,10 +12,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/ApiDocs.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
     private function isPrefixedRoute($route)
76 76
     {
77 77
         $prefix = $this->config->get('yaro.apidocs.prefix', 'api');
78
-        $regexp = '~^'. preg_quote($prefix) .'~';
78
+        $regexp = '~^'.preg_quote($prefix).'~';
79 79
         
80 80
         return preg_match($regexp, $this->getRouteParam($route, 'uri'));
81 81
     } // end isPrefixedRoute
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $checkForLongDescription = true;
110 110
         foreach ($docs as $line) {
111 111
             if ($checkForLongDescription && !preg_match('~^@\w+~', $line)) {
112
-                $description .= trim($line) .' ';
112
+                $description .= trim($line).' ';
113 113
             } elseif (preg_match('~^@\w+~', $line)) {
114 114
                 $checkForLongDescription = false;
115 115
                 if (preg_match('~^@param~', $line)) {
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         ksort($endpoints);
178 178
 
179 179
         $sorted = array();
180
-        foreach($endpoints as $key => $val) {
180
+        foreach ($endpoints as $key => $val) {
181 181
             $this->ins($sorted, explode('.', $key), $val);
182 182
         }
183 183
         
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
         $httpMethod = $this->getRouteParam($route, 'methods.0');
198 198
         $classMethod = implode('-', $this->splitCamelCaseToWords($method));
199 199
         
200
-        $hash = $path .'::'. $httpMethod .'::'. $classMethod;
200
+        $hash = $path.'::'.$httpMethod.'::'.$classMethod;
201 201
         
202 202
         return strtolower($hash);
203 203
     } // end generateHashForUrl
@@ -230,8 +230,7 @@  discard block
 block discarded – undo
230 230
     private function ins(&$ary, $keys, $val) 
231 231
     {
232 232
         $keys ? 
233
-            $this->ins($ary[array_shift($keys)], $keys, $val) :
234
-            $ary = $val;
233
+            $this->ins($ary[array_shift($keys)], $keys, $val) : $ary = $val;
235 234
     } // end ins
236 235
     
237 236
 }
Please login to merge, or discard this patch.