Selaa lähdekoodia

Apply fixes from StyleCI

Marcel Pociot 5 vuotta sitten
vanhempi
commit
29f9e9a699

+ 2 - 3
src/Commands/GenerateDocumentation.php

@@ -98,12 +98,11 @@ class GenerateDocumentation extends Command
         foreach ($routes as $routeItem) {
             $route = $routeItem['route'];
             /** @var Route $route */
-
             $messageFormat = '%s route: [%s] %s';
             $routeMethods = implode(',', $generator->getMethods($route));
             $routePath = $generator->getUri($route);
 
-            if (!$this->isValidRoute($route) || !$this->isRouteVisibleForDocumentation($route->getAction())) {
+            if (! $this->isValidRoute($route) || ! $this->isRouteVisibleForDocumentation($route->getAction())) {
                 $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath));
                 continue;
             }
@@ -112,7 +111,7 @@ class GenerateDocumentation extends Command
                 $parsedRoutes[] = $generator->processRoute($route, $routeItem['apply'] ?? []);
                 $this->info(sprintf($messageFormat, 'Processed', $routeMethods, $routePath));
             } catch (\Exception $exception) {
-                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath) . ' - ' . $exception->getMessage());
+                $this->warn(sprintf($messageFormat, 'Skipping', $routeMethods, $routePath).' - '.$exception->getMessage());
             }
         }
 

+ 2 - 2
src/Extracting/Strategies/Responses/UseResponseFileTag.php

@@ -57,8 +57,8 @@ class UseResponseFileTag extends Strategy
             preg_match('/^(\d{3})?\s?([\S]*[\s]*?)(\{.*\})?$/', $responseFileTag->getContent(), $result);
             $relativeFilePath = trim($result[2]);
             $filePath = storage_path($relativeFilePath);
-            if (!file_exists($filePath)) {
-                throw new \Exception('@responseFile ' . $relativeFilePath . ' does not exist');
+            if (! file_exists($filePath)) {
+                throw new \Exception('@responseFile '.$relativeFilePath.' does not exist');
             }
             $status = $result[1] ?: 200;
             $content = $result[2] ? file_get_contents($filePath, true) : '{}';