Browse Source

Merge pull request #727 from mpociot/analysis-VrorAg

Apply fixes from StyleCI
Marcel Pociot 5 years ago
parent
commit
c354e94928

+ 4 - 4
src/Commands/GenerateDocumentation.php

@@ -107,12 +107,12 @@ class GenerateDocumentation extends Command
             }
 
             if (! $this->doesControllerMethodExist($routeControllerAndMethod)) {
-                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).': Controller method does not exist.');
+                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ': Controller method does not exist.');
                 continue;
             }
 
             if (! $this->isRouteVisibleForDocumentation($routeControllerAndMethod)) {
-                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).': @hideFromAPIDocumentation was specified.');
+                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ': @hideFromAPIDocumentation was specified.');
                 continue;
             }
 
@@ -120,7 +120,7 @@ class GenerateDocumentation extends Command
                 $parsedRoutes[] = $generator->processRoute($route, $routeItem->getRules());
                 $this->info(sprintf($messageFormat, 'Processed', $routeMethods, $routePath));
             } catch (\Exception $exception) {
-                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).'- Exception '.get_class($exception).' encountered : '.$exception->getMessage());
+                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . '- Exception ' . get_class($exception) . ' encountered : ' . $exception->getMessage());
             }
         }
 
@@ -139,7 +139,7 @@ class GenerateDocumentation extends Command
             if (Utils::isInvokableObject($classOrObject)) {
                 return true;
             }
-            $routeControllerAndMethod = $classOrObject.'@'.$method;
+            $routeControllerAndMethod = $classOrObject . '@' . $method;
         }
 
         return ! is_callable($routeControllerAndMethod) && ! is_null($routeControllerAndMethod);

+ 1 - 1
src/Extracting/RouteDocBlocker.php

@@ -61,7 +61,7 @@ class RouteDocBlocker
         if (is_object($classNameOrInstance)) {
             // route handlers are not destroyed until the script
             // ends so this should be perfectly safe.
-            $classNameOrInstance = get_class($classNameOrInstance).'::'.spl_object_id($classNameOrInstance);
+            $classNameOrInstance = get_class($classNameOrInstance) . '::' . spl_object_id($classNameOrInstance);
         }
 
         return $classNameOrInstance;

+ 1 - 1
tests/GenerateDocumentationTest.php

@@ -76,7 +76,7 @@ class GenerateDocumentationTest extends TestCase
             $api->get('/closure', function () {
                 return 'foo';
             });
-            $api->get('/test', TestController::class.'@withEndpointDescription');
+            $api->get('/test', TestController::class . '@withEndpointDescription');
         });
 
         config(['apidoc.router' => 'dingo']);