From 861961066d460dfca27c8eea8c18a0012d42c83c Mon Sep 17 00:00:00 2001 From: Marcel Pociot Date: Sat, 8 Feb 2020 16:18:16 +0100 Subject: [PATCH] Apply fixes from StyleCI (#42) --- src/Console/Commands/BotManInstallDriver.php | 2 +- src/Providers/DriverServiceProvider.php | 2 +- src/Providers/StudioServiceProvider.php | 10 +++++----- src/Testing/BotManTester.php | 14 +++++++------- tests/BotManTesterTest.php | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/Console/Commands/BotManInstallDriver.php b/src/Console/Commands/BotManInstallDriver.php index 53d8b47..333e714 100644 --- a/src/Console/Commands/BotManInstallDriver.php +++ b/src/Console/Commands/BotManInstallDriver.php @@ -2,8 +2,8 @@ namespace BotMan\Studio\Console\Commands; -use GuzzleHttp\Client; use BotMan\Studio\Composer; +use GuzzleHttp\Client; use Illuminate\Console\Command; class BotManInstallDriver extends Command diff --git a/src/Providers/DriverServiceProvider.php b/src/Providers/DriverServiceProvider.php index 8507b62..b5c2024 100644 --- a/src/Providers/DriverServiceProvider.php +++ b/src/Providers/DriverServiceProvider.php @@ -2,8 +2,8 @@ namespace BotMan\Studio\Providers; -use Illuminate\Support\ServiceProvider; use BotMan\BotMan\Drivers\DriverManager; +use Illuminate\Support\ServiceProvider; use TheCodingMachine\Discovery\Discovery; class DriverServiceProvider extends ServiceProvider diff --git a/src/Providers/StudioServiceProvider.php b/src/Providers/StudioServiceProvider.php index b774167..d95a322 100644 --- a/src/Providers/StudioServiceProvider.php +++ b/src/Providers/StudioServiceProvider.php @@ -2,14 +2,14 @@ namespace BotMan\Studio\Providers; -use Illuminate\Support\ServiceProvider; -use TheCodingMachine\Discovery\Discovery; -use BotMan\Studio\Console\Commands\BotManMakeTest; use BotMan\Studio\Console\Commands\BotManCacheClear; -use BotMan\Studio\Console\Commands\BotManListDrivers; use BotMan\Studio\Console\Commands\BotManInstallDriver; -use BotMan\Studio\Console\Commands\BotManMakeMiddleware; +use BotMan\Studio\Console\Commands\BotManListDrivers; use BotMan\Studio\Console\Commands\BotManMakeConversation; +use BotMan\Studio\Console\Commands\BotManMakeMiddleware; +use BotMan\Studio\Console\Commands\BotManMakeTest; +use Illuminate\Support\ServiceProvider; +use TheCodingMachine\Discovery\Discovery; class StudioServiceProvider extends ServiceProvider { diff --git a/src/Testing/BotManTester.php b/src/Testing/BotManTester.php index e08e2ac..7c685da 100644 --- a/src/Testing/BotManTester.php +++ b/src/Testing/BotManTester.php @@ -3,17 +3,17 @@ namespace BotMan\Studio\Testing; use BotMan\BotMan\BotMan; -use Illuminate\Support\Collection; -use PHPUnit\Framework\Assert as PHPUnit; use BotMan\BotMan\Drivers\Tests\FakeDriver; -use BotMan\BotMan\Messages\Attachments\File; use BotMan\BotMan\Messages\Attachments\Audio; +use BotMan\BotMan\Messages\Attachments\File; use BotMan\BotMan\Messages\Attachments\Image; -use BotMan\BotMan\Messages\Attachments\Video; -use BotMan\BotMan\Messages\Outgoing\Question; use BotMan\BotMan\Messages\Attachments\Location; +use BotMan\BotMan\Messages\Attachments\Video; use BotMan\BotMan\Messages\Incoming\IncomingMessage; use BotMan\BotMan\Messages\Outgoing\OutgoingMessage; +use BotMan\BotMan\Messages\Outgoing\Question; +use Illuminate\Support\Collection; +use PHPUnit\Framework\Assert as PHPUnit; /** * Class BotManTester. @@ -231,10 +231,10 @@ public function receivesEvent($name, $payload = null) $this->driver->setEventPayload($payload); $result = $this->receivesRaw(new IncomingMessage('', $this->user_id, $this->channel)); - + $this->driver->setEventName(null); $this->driver->setEventPayload(null); - + return $result; } diff --git a/tests/BotManTesterTest.php b/tests/BotManTesterTest.php index 7333eba..cf3b391 100644 --- a/tests/BotManTesterTest.php +++ b/tests/BotManTesterTest.php @@ -2,19 +2,19 @@ namespace Tests; -use Mockery as m; use BotMan\BotMan\BotMan; -use PHPUnit\Framework\TestCase; use BotMan\BotMan\BotManFactory; -use BotMan\Studio\Testing\BotManTester; use BotMan\BotMan\Drivers\Tests\FakeDriver; -use BotMan\BotMan\Messages\Attachments\File; use BotMan\BotMan\Messages\Attachments\Audio; +use BotMan\BotMan\Messages\Attachments\File; use BotMan\BotMan\Messages\Attachments\Image; -use BotMan\BotMan\Messages\Attachments\Video; -use BotMan\BotMan\Messages\Outgoing\Question; use BotMan\BotMan\Messages\Attachments\Location; +use BotMan\BotMan\Messages\Attachments\Video; use BotMan\BotMan\Messages\Outgoing\OutgoingMessage; +use BotMan\BotMan\Messages\Outgoing\Question; +use BotMan\Studio\Testing\BotManTester; +use Mockery as m; +use PHPUnit\Framework\TestCase; class TemplateFake { @@ -37,12 +37,12 @@ class BotManTesterTest extends TestCase /** @var BotMan */ protected $botman; - public function tearDown() : void + public function tearDown(): void { m::close(); } - protected function setUp() :void + protected function setUp(): void { parent::setUp();