Test Failed
Push — master ( 159af9...b2d1de )
by Banciu N. Cristian Mihai
03:26
created
src/Component.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,8 +44,8 @@
 block discarded – undo
44 44
      */
45 45
     public function __construct(?string $id = null, ?LoggerInterface $logger = null)
46 46
     {
47
-        $this->id     = (! empty($id) ? $id : self::generateUniqueId());
48
-        $this->logger = (! empty($logger) ? $logger : new NullLogger());
47
+        $this->id     = (!empty($id) ? $id : self::generateUniqueId());
48
+        $this->logger = (!empty($logger) ? $logger : new NullLogger());
49 49
     }
50 50
 
51 51
     /**
Please login to merge, or discard this patch.
src/Builder/ContainerBuilder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 
131 131
             if (
132 132
                 empty($topic['connection']) ||
133
-                ! $container->connections()->has($topic['connection'])
133
+                !$container->connections()->has($topic['connection'])
134 134
             ) {
135 135
                 throw new \RuntimeException(
136 136
                     vsprintf(
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 
183 183
             if (
184 184
                 empty($queue['connection']) ||
185
-                ! $container->connections()->has($queue['connection'])
185
+                !$container->connections()->has($queue['connection'])
186 186
             ) {
187 187
                 throw new \RuntimeException(
188 188
                     vsprintf(
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
 
230 230
             if (
231 231
                 empty($publisher['topic']) ||
232
-                ! $container->topics()->has($publisher['topic'])
232
+                !$container->topics()->has($publisher['topic'])
233 233
             ) {
234 234
                 throw new \RuntimeException(
235 235
                     vsprintf(
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
             if (
278 278
                 empty($consumer['queue']) ||
279
-                ! $container->queues()->has($consumer['queue'])
279
+                !$container->queues()->has($consumer['queue'])
280 280
             ) {
281 281
                 throw new \RuntimeException(
282 282
                     vsprintf(
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
 
296 296
             if (empty($processor)) {
297 297
                 $processor = new CallbackProcessor(
298
-                    function () {
298
+                    function() {
299 299
                         return false;
300 300
                     }
301 301
                 );
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
                 $processor = new $processor();
306 306
             }
307 307
 
308
-            if (! ($processor instanceof Processor)) {
308
+            if (!($processor instanceof Processor)) {
309 309
                 throw new \LogicException(
310 310
                     vsprintf(
311 311
                         "Can't create processor, '%s' must extend from %s or its child class.",
Please login to merge, or discard this patch.
src/CarrotMQ.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
      */
46 46
     public function container(): Container
47 47
     {
48
-        if (! isset($this->container)) {
48
+        if (!isset($this->container)) {
49 49
             $this->build();
50 50
         }
51 51
 
Please login to merge, or discard this patch.
src/Consumer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $this->extensions = new ExtensionRepository();
102 102
 
103 103
         $this->tag = (
104
-            ! empty($this->tag)
104
+            !empty($this->tag)
105 105
                 ? $this->tag
106 106
                 : vsprintf('[host: %s]-[pid: %s]-[queue: %s]', [gethostname(), getmypid(), $this->queue->name()])
107 107
         );
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         $this->dispatcher(true);
161 161
 
162 162
         foreach ($this->extensions->all() as $extension) {
163
-            if (! is_subclass_of($extension, Extension::class)) {
163
+            if (!is_subclass_of($extension, Extension::class)) {
164 164
                 throw new Exception(
165 165
                     vsprintf(
166 166
                         'The given class, "%s", is not an instance of "%s"',
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         */
244 244
         $subscription->subscribe(
245 245
             $consumer,
246
-            function ($message, $consumer) use ($context) {
246
+            function($message, $consumer) use ($context) {
247 247
                 return $this->handle($message, $consumer, $context);
248 248
             }
249 249
         );
Please login to merge, or discard this patch.
src/Support/Laravel/Console/Commands/PublisherCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
         $route       = (string) $this->input->getOption('route');
48 48
         $data        = '';
49 49
 
50
-        if (! $this->carrot->container()->publishers()->has($publisherId)) {
50
+        if (!$this->carrot->container()->publishers()->has($publisherId)) {
51 51
             $this->error(vsprintf('Publisher "%s" not found.', [$publisherId]));
52 52
             return 0;
53 53
         }
54 54
 
55 55
         $publisher = $this->carrot->container()->publishers()->get($publisherId);
56 56
 
57
-        while (! feof(STDIN)) {
57
+        while (!feof(STDIN)) {
58 58
             $data .= fread(STDIN, 8192);
59 59
         }
60 60
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         $message = MessageBuilder::create()->body($data)->build();
66 66
 
67
-        if (! empty($route)) {
67
+        if (!empty($route)) {
68 68
             $message->setRoutingKey($route);
69 69
         }
70 70
 
Please login to merge, or discard this patch.
src/Support/Laravel/Console/Commands/ConsumerCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
     {
47 47
         $consumerId = (string) $this->input->getArgument('consumer');
48 48
 
49
-        if (! $this->carrot->container()->consumers()->has($consumerId)) {
49
+        if (!$this->carrot->container()->consumers()->has($consumerId)) {
50 50
             $this->error(vsprintf('Consumer "%s" not found.', [$consumerId]));
51 51
             return 0;
52 52
         }
Please login to merge, or discard this patch.
src/Support/Laravel/Console/Commands/PurgeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
     {
38 38
         $queueId = (string) $this->input->getArgument('queue');
39 39
 
40
-        if (! $this->carrot->container()->queues()->has($queueId)) {
40
+        if (!$this->carrot->container()->queues()->has($queueId)) {
41 41
             $this->error(vsprintf('Queue "%s" not found.', [$queueId]));
42 42
             return 0;
43 43
         }
Please login to merge, or discard this patch.
src/Support/Laravel/CarrotMQServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $config = config('carrot_mq', []);
56 56
 
57
-        if (! is_array($config)) {
57
+        if (!is_array($config)) {
58 58
             throw new \RuntimeException(
59 59
                 'Invalid configuration provided for CarrotMQ-Laravel!'
60 60
             );
61 61
         }
62 62
 
63
-        $this->app->bind('carrot.mq', function (Application $app) {
63
+        $this->app->bind('carrot.mq', function(Application $app) {
64 64
             return app(CarrotMQ::class);
65 65
         });
66 66
 
67
-        $this->app->singleton(CarrotMQ::class, function (Application $app, $arguments) use ($config) {
67
+        $this->app->singleton(CarrotMQ::class, function(Application $app, $arguments) use ($config) {
68 68
             $logger = $app->make(LoggerInterface::class);
69 69
             $carrot = new CarrotMQ($config, $logger);
70 70
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     protected function prepareCommands()
79 79
     {
80
-        if (! $this->app->runningInConsole()) {
80
+        if (!$this->app->runningInConsole()) {
81 81
             return;
82 82
         }
83 83
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function getConfigFile()
100 100
     {
101
-        return (__DIR__ . '/config/carrot_mq.php');
101
+        return (__DIR__.'/config/carrot_mq.php');
102 102
     }
103 103
 
104 104
 }
Please login to merge, or discard this patch.
src/Support/DispatcherAwareTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
      */
25 25
     protected function dispatcher(bool $fresh = false): EventDispatcher
26 26
     {
27
-        if ($fresh || ! isset($this->dispatcher)) {
27
+        if ($fresh || !isset($this->dispatcher)) {
28 28
             $this->dispatcher = new EventDispatcher();
29 29
         }
30 30
 
Please login to merge, or discard this patch.