Completed
Branch master (f7cff5)
by Yaro
01:35
created
Category
src/ApiDocs.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
             /x';
39 39
         
40 40
         foreach ($this->router->getRoutes() as $route) {
41
-            if (!preg_match('~^'. preg_quote($prefix) .'~', $route->uri)) {
41
+            if (!preg_match('~^'.preg_quote($prefix).'~', $route->uri)) {
42 42
                 continue;
43 43
             }
44 44
             
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             $checkForLongDescription = true;
76 76
             foreach ($docs as $line) {
77 77
                 if ($checkForLongDescription && !preg_match('~^@\w+~', $line)) {
78
-                    $description .= trim($line) .' ';
78
+                    $description .= trim($line).' ';
79 79
                 } elseif (preg_match('~^@\w+~', $line)) {
80 80
                     $checkForLongDescription = false;
81 81
                     if (preg_match('~^@param~', $line)) {
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
             $uriParams = isset($matches[1]) ? $matches[1] : [];
122 122
             
123 123
             $endpoints[$key][] = [
124
-                'hash'    => strtolower(preg_replace('~\s+~', '-', $key) .'::'. $route->methods[0] .'::'. implode('-', preg_split($splitCamelCaseRegexp, $method))),
124
+                'hash'    => strtolower(preg_replace('~\s+~', '-', $key).'::'.$route->methods[0].'::'.implode('-', preg_split($splitCamelCaseRegexp, $method))),
125 125
                 'uri'     => $route->uri,
126 126
                 'name'    => $method,
127 127
                 'methods' => $route->methods,
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         ksort($endpoints);
138 138
     
139 139
         $sorted = array();
140
-        foreach($endpoints as $key => $val) {
140
+        foreach ($endpoints as $key => $val) {
141 141
             ins($sorted, explode('.', $key), $val);
142 142
         }
143 143
         return $sorted;
Please login to merge, or discard this patch.
src/ServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,19 +11,19 @@
 block discarded – undo
11 11
     public function boot()
12 12
     {
13 13
         $this->publishes([
14
-            __DIR__ . '/../config/apidocs.php' => config_path('yaro.apidocs.php'),
14
+            __DIR__.'/../config/apidocs.php' => config_path('yaro.apidocs.php'),
15 15
         ], 'config');
16 16
         
17 17
         $this->publishes([
18
-            __DIR__ . '/../public' => public_path('vendor/yaro/apidocs'),
18
+            __DIR__.'/../public' => public_path('vendor/yaro/apidocs'),
19 19
         ], 'public');
20 20
         
21
-        $this->app['view']->addNamespace('apidocs', __DIR__ . '/../resources/views');
21
+        $this->app['view']->addNamespace('apidocs', __DIR__.'/../resources/views');
22 22
     } // end boot
23 23
 
24 24
     public function register()
25 25
     {
26
-        $configPath = __DIR__ . '/../config/apidocs.php';
26
+        $configPath = __DIR__.'/../config/apidocs.php';
27 27
         $this->mergeConfigFrom($configPath, 'yaro.apidocs');
28 28
         
29 29
         $this->app->singleton('yaro.apidocs', function($app) {
Please login to merge, or discard this patch.