Test Setup Failed
Branch master (15600f)
by Leonardo
09:29
created
Category
src/GracefulShutdown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      * @param bool $debug
34 34
      */
35 35
     public function __construct(
36
-        array $signals = [SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGQUIT, SIGHUP],
36
+        array $signals = [ SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGQUIT, SIGHUP ],
37 37
         bool $debug = false
38 38
     ) {
39 39
         $this->signals = $signals;
Please login to merge, or discard this patch.
examples/graceful-shutdown.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 require_once __DIR__ . '/../vendor/autoload.php';
4 4
 
5 5
 $shutdown = new LeoCarmo\GracefulShutdown\GracefulShutdown(
6
-    [SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGQUIT, SIGHUP],
6
+    [ SIGTERM, SIGINT, SIGUSR1, SIGUSR2, SIGQUIT, SIGHUP ],
7 7
     true
8 8
 );
9 9
 
10
-while (! $shutdown->signalReceived()) {
10
+while (!$shutdown->signalReceived()) {
11 11
 
12 12
     echo 'Start long task...' . PHP_EOL;
13 13
     sleep(sleep(5)); // --> when a signal is sent, sleep returns the number of seconds left
Please login to merge, or discard this patch.