Skip to content

Commit

Permalink
Merge pull request #108 from mpociot/analysis-qBP34L
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
mpociot authored Oct 6, 2016
2 parents f7f8407 + 5f37e0c commit f76ce80
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private function writeMarkdown($parsedRoutes)
return $routeGroup->transform(function ($route) use ($generatedDocumentation, $compareDocumentation) {
if (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $generatedDocumentation, $routeMatch)) {
$routeDocumentationChanged = (preg_match('/<!-- START_'.$route['id'].' -->(.*)<!-- END_'.$route['id'].' -->/is', $compareDocumentation, $compareMatch) && $compareMatch[1] !== $routeMatch[1]);
if ($routeDocumentationChanged === false || $this->option('force')) {
if ($routeDocumentationChanged === false || $this->option('force')) {
if ($routeDocumentationChanged) {
$this->warn('Discarded manual changes for route ['.implode(',', $route['methods']).'] '.$route['uri']);
}
Expand Down Expand Up @@ -282,7 +282,7 @@ private function processDingoRoutes(AbstractGenerator $generator, $allowedRoutes
if (empty($allowedRoutes) || in_array($route->getName(), $allowedRoutes) || str_is($routePrefix, $route->uri()) || in_array($middleware, $route->middleware())) {
if ($this->isValidRoute($route) && $this->isRouteVisibleForDocumentation($route->getAction()['uses'])) {
$parsedRoutes[] = $generator->processRoute($route, $bindings, $this->option('header'), $withResponse);
$this->info('Processed route: [' . implode(',', $route->getMethods()) . '] ' . $route->uri());
$this->info('Processed route: ['.implode(',', $route->getMethods()).'] '.$route->uri());
} else {
$this->warn('Skipping route: ['.implode(',', $route->getMethods()).'] '.$route->uri());
}
Expand Down
2 changes: 1 addition & 1 deletion tests/GenerateDocumentationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function getPackageProviders($app)
{
return [
LaravelServiceProvider::class,
ApiDocGeneratorServiceProvider::class
ApiDocGeneratorServiceProvider::class,
];
}

Expand Down

0 comments on commit f76ce80

Please sign in to comment.