From 6958f1129c51de65af97e3906dba56ba12d1aa5c Mon Sep 17 00:00:00 2001 From: aarondfrancis Date: Thu, 13 Apr 2023 14:08:33 +0000 Subject: [PATCH] Fix code styling [ci skip] --- src/IsPseudoDaemon.php | 3 +-- src/PseudoDaemonControl.php | 4 +++- src/PseudoDaemonServiceProvider.php | 2 +- tests/EventDaemonizeTest.php | 4 ++-- tests/PseudoDaemonTraitTest.php | 7 ++++--- tests/Support/TestCommand.php | 6 ++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/IsPseudoDaemon.php b/src/IsPseudoDaemon.php index 285f868..7b1b6c9 100644 --- a/src/IsPseudoDaemon.php +++ b/src/IsPseudoDaemon.php @@ -132,5 +132,4 @@ public function currentForgeEnvoyerRelease() return shell_exec('readlink ' . escapeshellarg($pwd)); } } - -} \ No newline at end of file +} diff --git a/src/PseudoDaemonControl.php b/src/PseudoDaemonControl.php index f66e4c9..500f0f9 100644 --- a/src/PseudoDaemonControl.php +++ b/src/PseudoDaemonControl.php @@ -8,6 +8,8 @@ class PseudoDaemonControl { const STOP = 1; + const DONT_SLEEP = 2; + const DO_SLEEP = 3; -} \ No newline at end of file +} diff --git a/src/PseudoDaemonServiceProvider.php b/src/PseudoDaemonServiceProvider.php index f25998e..a848e04 100644 --- a/src/PseudoDaemonServiceProvider.php +++ b/src/PseudoDaemonServiceProvider.php @@ -21,4 +21,4 @@ public function register() return $this->everyMinute()->runInBackground()->withoutOverlapping(); }); } -} \ No newline at end of file +} diff --git a/tests/EventDaemonizeTest.php b/tests/EventDaemonizeTest.php index 8ed2ba2..fb38116 100644 --- a/tests/EventDaemonizeTest.php +++ b/tests/EventDaemonizeTest.php @@ -5,10 +5,10 @@ namespace Hammerstone\PseudoDaemon\Tests; +use Hammerstone\PseudoDaemon\PseudoDaemonServiceProvider; use Illuminate\Console\Scheduling\CacheEventMutex; use Illuminate\Console\Scheduling\Event; use Orchestra\Testbench\TestCase; -use Hammerstone\PseudoDaemon\PseudoDaemonServiceProvider; class EventDaemonizeTest extends TestCase { @@ -29,4 +29,4 @@ public function daemonize_macro_sets_appropriate_properties() $this->assertTrue($event->withoutOverlapping); $this->assertEquals('* * * * *', $event->expression); } -} \ No newline at end of file +} diff --git a/tests/PseudoDaemonTraitTest.php b/tests/PseudoDaemonTraitTest.php index 55a9e59..61231e2 100644 --- a/tests/PseudoDaemonTraitTest.php +++ b/tests/PseudoDaemonTraitTest.php @@ -5,11 +5,11 @@ namespace Hammerstone\PseudoDaemon\Tests; +use Hammerstone\PseudoDaemon\PseudoDaemonControl; +use Hammerstone\PseudoDaemon\Tests\Support\TestCommand; use Illuminate\Support\Carbon; use Mockery; use Orchestra\Testbench\TestCase; -use Hammerstone\PseudoDaemon\PseudoDaemonControl; -use Hammerstone\PseudoDaemon\Tests\Support\TestCommand; class PseudoDaemonTraitTest extends TestCase { @@ -109,6 +109,7 @@ public function changing_data_stops_the_daemon() $command->shouldReceive('restartWhenChanged')->andReturnUsing(function () use (&$fakeData) { $fakeData++; + return $fakeData < 5 ? 'Less than five' : 'More than five'; }); @@ -168,4 +169,4 @@ public function before_shutdown_is_called_once() $command->handle(); } -} \ No newline at end of file +} diff --git a/tests/Support/TestCommand.php b/tests/Support/TestCommand.php index 9da3a4a..9bd8509 100644 --- a/tests/Support/TestCommand.php +++ b/tests/Support/TestCommand.php @@ -5,9 +5,8 @@ namespace Hammerstone\PseudoDaemon\Tests\Support; - -use Illuminate\Console\Command; use Hammerstone\PseudoDaemon\IsPseudoDaemon; +use Illuminate\Console\Command; class TestCommand extends Command { @@ -25,5 +24,4 @@ public function process() { } - -} \ No newline at end of file +}