From 39d4195c0e5287331386ff667cc49bcf5851db6b Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Wed, 7 Dec 2016 14:57:18 +0000 Subject: [PATCH] Apply fixes from StyleCI --- .../ApiDoc/Commands/GenerateDocumentation.php | 11 +++++------ src/Mpociot/ApiDoc/Generators/AbstractGenerator.php | 8 ++++---- src/Mpociot/ApiDoc/Postman/CollectionWriter.php | 2 +- tests/ApiDocGeneratorTest.php | 8 ++++---- tests/DingoGeneratorTest.php | 8 ++++---- tests/GenerateDocumentationTest.php | 12 ++++++------ tests/RuleDescriptionParserTest.php | 8 ++++---- 7 files changed, 28 insertions(+), 29 deletions(-) diff --git a/src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php b/src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php index 3f4d40f3..0fd0a775 100644 --- a/src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php +++ b/src/Mpociot/ApiDoc/Commands/GenerateDocumentation.php @@ -2,16 +2,16 @@ namespace Mpociot\ApiDoc\Commands; +use ReflectionClass; use Illuminate\Console\Command; +use Mpociot\Reflection\DocBlock; use Illuminate\Support\Collection; use Illuminate\Support\Facades\Route; -use Mpociot\ApiDoc\Generators\AbstractGenerator; +use Mpociot\Documentarian\Documentarian; +use Mpociot\ApiDoc\Postman\CollectionWriter; use Mpociot\ApiDoc\Generators\DingoGenerator; use Mpociot\ApiDoc\Generators\LaravelGenerator; -use Mpociot\ApiDoc\Postman\CollectionWriter; -use Mpociot\Documentarian\Documentarian; -use Mpociot\Reflection\DocBlock; -use ReflectionClass; +use Mpociot\ApiDoc\Generators\AbstractGenerator; class GenerateDocumentation extends Command { @@ -186,7 +186,6 @@ private function writeMarkdown($parsedRoutes) $this->info('Wrote HTML documentation to: '.$outputPath.'/public/index.html'); - if ($this->option('noPostmanCollection') !== true) { $this->info('Generating Postman collection'); diff --git a/src/Mpociot/ApiDoc/Generators/AbstractGenerator.php b/src/Mpociot/ApiDoc/Generators/AbstractGenerator.php index 5c4ada8c..20798c16 100644 --- a/src/Mpociot/ApiDoc/Generators/AbstractGenerator.php +++ b/src/Mpociot/ApiDoc/Generators/AbstractGenerator.php @@ -3,13 +3,13 @@ namespace Mpociot\ApiDoc\Generators; use Faker\Factory; -use Illuminate\Foundation\Http\FormRequest; +use ReflectionClass; use Illuminate\Support\Arr; -use Illuminate\Support\Facades\Validator; use Illuminate\Support\Str; -use Mpociot\ApiDoc\Parsers\RuleDescriptionParser as Description; -use ReflectionClass; use Mpociot\Reflection\DocBlock; +use Illuminate\Support\Facades\Validator; +use Illuminate\Foundation\Http\FormRequest; +use Mpociot\ApiDoc\Parsers\RuleDescriptionParser as Description; abstract class AbstractGenerator { diff --git a/src/Mpociot/ApiDoc/Postman/CollectionWriter.php b/src/Mpociot/ApiDoc/Postman/CollectionWriter.php index f5933d80..6bf21865 100644 --- a/src/Mpociot/ApiDoc/Postman/CollectionWriter.php +++ b/src/Mpociot/ApiDoc/Postman/CollectionWriter.php @@ -2,8 +2,8 @@ namespace Mpociot\ApiDoc\Postman; -use Illuminate\Support\Collection; use Ramsey\Uuid\Uuid; +use Illuminate\Support\Collection; class CollectionWriter { diff --git a/tests/ApiDocGeneratorTest.php b/tests/ApiDocGeneratorTest.php index fe351a70..38cf7b54 100644 --- a/tests/ApiDocGeneratorTest.php +++ b/tests/ApiDocGeneratorTest.php @@ -3,12 +3,12 @@ namespace Mpociot\ApiDoc\Tests; use Illuminate\Routing\Route; -use Illuminate\Support\Facades\Route as RouteFacade; -use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; +use Orchestra\Testbench\TestCase; +use Mpociot\ApiDoc\Tests\Fixtures\TestRequest; use Mpociot\ApiDoc\Generators\LaravelGenerator; use Mpociot\ApiDoc\Tests\Fixtures\TestController; -use Mpociot\ApiDoc\Tests\Fixtures\TestRequest; -use Orchestra\Testbench\TestCase; +use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; +use Illuminate\Support\Facades\Route as RouteFacade; class ApiDocGeneratorTest extends TestCase { diff --git a/tests/DingoGeneratorTest.php b/tests/DingoGeneratorTest.php index 1684c2ce..3fac1394 100644 --- a/tests/DingoGeneratorTest.php +++ b/tests/DingoGeneratorTest.php @@ -2,13 +2,13 @@ namespace Mpociot\ApiDoc\Tests; +use Orchestra\Testbench\TestCase; +use Mpociot\ApiDoc\Generators\DingoGenerator; use Dingo\Api\Provider\LaravelServiceProvider; +use Mpociot\ApiDoc\Tests\Fixtures\TestRequest; +use Mpociot\ApiDoc\Tests\Fixtures\TestController; use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; -use Mpociot\ApiDoc\Generators\DingoGenerator; use Mpociot\ApiDoc\Tests\Fixtures\DingoTestController; -use Mpociot\ApiDoc\Tests\Fixtures\TestController; -use Mpociot\ApiDoc\Tests\Fixtures\TestRequest; -use Orchestra\Testbench\TestCase; class DingoGeneratorTest extends TestCase { diff --git a/tests/GenerateDocumentationTest.php b/tests/GenerateDocumentationTest.php index b5e85ec0..ee67ab6f 100644 --- a/tests/GenerateDocumentationTest.php +++ b/tests/GenerateDocumentationTest.php @@ -2,16 +2,16 @@ namespace Mpociot\ApiDoc\Tests; -use Dingo\Api\Provider\LaravelServiceProvider; -use Illuminate\Contracts\Console\Kernel; use Illuminate\Routing\Route; -use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; -use Mpociot\ApiDoc\Generators\LaravelGenerator; -use Mpociot\ApiDoc\Tests\Fixtures\DingoTestController; use Orchestra\Testbench\TestCase; +use Illuminate\Contracts\Console\Kernel; +use Dingo\Api\Provider\LaravelServiceProvider; +use Mpociot\ApiDoc\Generators\LaravelGenerator; use Mpociot\ApiDoc\Tests\Fixtures\TestController; -use Mpociot\ApiDoc\Tests\Fixtures\TestResourceController; +use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; use Illuminate\Support\Facades\Route as RouteFacade; +use Mpociot\ApiDoc\Tests\Fixtures\DingoTestController; +use Mpociot\ApiDoc\Tests\Fixtures\TestResourceController; class GenerateDocumentationTest extends TestCase { diff --git a/tests/RuleDescriptionParserTest.php b/tests/RuleDescriptionParserTest.php index 4ae9859f..1281bdaf 100644 --- a/tests/RuleDescriptionParserTest.php +++ b/tests/RuleDescriptionParserTest.php @@ -2,12 +2,12 @@ namespace Mpociot\ApiDoc\Tests; -use Illuminate\Translation\LoaderInterface; +use Mockery as m; +use Orchestra\Testbench\TestCase; use Illuminate\Translation\Translator; -use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; +use Illuminate\Translation\LoaderInterface; use Mpociot\ApiDoc\Parsers\RuleDescriptionParser; -use Orchestra\Testbench\TestCase; -use Mockery as m; +use Mpociot\ApiDoc\ApiDocGeneratorServiceProvider; class RuleDescriptionParserTest extends TestCase {