Passed
Pull Request — master (#656)
by Abdul Malik
16:45
created
src/Broadcasting/src/Driver/AbstractBroadcast.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
      */
29 29
     protected function toArray($entries): array
30 30
     {
31
-        switch (true) {
31
+        switch (true){
32 32
             case \is_array($entries):
33 33
                 return $entries;
34 34
 
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,8 @@
 block discarded – undo
28 28
      */
29 29
     protected function toArray($entries): array
30 30
     {
31
-        switch (true) {
31
+        switch (true)
32
+        {
32 33
             case \is_array($entries):
33 34
                 return $entries;
34 35
 
Please login to merge, or discard this patch.
src/Queue/src/QueueableDetector.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $reflection = new ReflectionClass($object);
26 26
 
27
-        if ($reflection->implementsInterface(QueueableInterface::class)) {
27
+        if ($reflection->implementsInterface(QueueableInterface::class)){
28 28
             return true;
29 29
         }
30 30
 
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
         $reflection = new ReflectionClass($object);
40 40
 
41 41
         $attribute = $this->reader->firstClassMetadata($reflection, Queueable::class);
42
-        if ($attribute !== null) {
42
+        if ($attribute !== null){
43 43
             return $attribute->queue;
44 44
         }
45 45
 
46
-        if (\is_object($object) && $reflection->hasMethod('getQueue')) {
46
+        if (\is_object($object) && $reflection->hasMethod('getQueue')){
47 47
             return $reflection->getMethod('getQueue')->invoke($object);
48 48
         }
49 49
 
Please login to merge, or discard this patch.
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,8 @@  discard block
 block discarded – undo
24 24
     {
25 25
         $reflection = new ReflectionClass($object);
26 26
 
27
-        if ($reflection->implementsInterface(QueueableInterface::class)) {
27
+        if ($reflection->implementsInterface(QueueableInterface::class))
28
+        {
28 29
             return true;
29 30
         }
30 31
 
@@ -39,11 +40,13 @@  discard block
 block discarded – undo
39 40
         $reflection = new ReflectionClass($object);
40 41
 
41 42
         $attribute = $this->reader->firstClassMetadata($reflection, Queueable::class);
42
-        if ($attribute !== null) {
43
+        if ($attribute !== null)
44
+        {
43 45
             return $attribute->queue;
44 46
         }
45 47
 
46
-        if (\is_object($object) && $reflection->hasMethod('getQueue')) {
48
+        if (\is_object($object) && $reflection->hasMethod('getQueue'))
49
+        {
47 50
             return $reflection->getMethod('getQueue')->invoke($object);
48 51
         }
49 52
 
Please login to merge, or discard this patch.
rector.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 return static function (RectorConfig $rectorConfig): void {
12 12
     $rectorConfig->paths([
13
-        __DIR__ . '/src/*/src',
13
+        __DIR__.'/src/*/src',
14 14
     ]);
15 15
 
16 16
     $rectorConfig->importNames();
@@ -19,13 +19,13 @@  discard block
 block discarded – undo
19 19
         CountOnNullRector::class,
20 20
 
21 21
         RemoveUnusedPrivateMethodRector::class => [
22
-            __DIR__ . '/src/Boot/src/Bootloader/ConfigurationBootloader.php',
23
-            __DIR__ . '/src/Broadcasting/src/Bootloader/BroadcastingBootloader.php',
22
+            __DIR__.'/src/Boot/src/Bootloader/ConfigurationBootloader.php',
23
+            __DIR__.'/src/Broadcasting/src/Bootloader/BroadcastingBootloader.php',
24 24
         ],
25 25
 
26 26
         // deprecated classes
27
-        __DIR__ . '/src/Http/src/Exception/EmitterException.php',
28
-        __DIR__ . '/src/Dumper/src/Exception/DumperException.php',
27
+        __DIR__.'/src/Http/src/Exception/EmitterException.php',
28
+        __DIR__.'/src/Dumper/src/Exception/DumperException.php',
29 29
     ]);
30 30
     $rectorConfig->sets([LevelSetList::UP_TO_PHP_74, SetList::DEAD_CODE]);
31 31
 };
Please login to merge, or discard this patch.
src/Broadcasting/src/Bootloader/WebsocketsBootloader.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         );
37 37
 
38 38
 
39
-        if ($config->getAuthorizationPath() !== null) {
39
+        if ($config->getAuthorizationPath() !== null){
40 40
             $http->addMiddleware(AuthorizationMiddleware::class);
41 41
         }
42 42
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,8 @@
 block discarded – undo
36 36
         );
37 37
 
38 38
 
39
-        if ($config->getAuthorizationPath() !== null) {
39
+        if ($config->getAuthorizationPath() !== null)
40
+        {
40 41
             $http->addMiddleware(AuthorizationMiddleware::class);
41 42
         }
42 43
     }
Please login to merge, or discard this patch.
src/SendIt/src/Bootloader/MailerBootloader.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function start(Container $container): void
71 71
     {
72
-        if ($container->has(JobRegistry::class)) {
72
+        if ($container->has(JobRegistry::class)){
73 73
             // Will be removed since v3.0
74 74
             $registry = $container->get(JobRegistry::class);
75 75
             $registry->setHandler(MailQueue::JOB_NAME, MailJobAdapter::class);
@@ -78,16 +78,16 @@  discard block
 block discarded – undo
78 78
             $container->bindSingleton(
79 79
                 MailerInterface::class,
80 80
                 static function (MailerConfig $config) use ($container) {
81
-                    if ($config->getQueueConnection() === 'sync') {
81
+                    if ($config->getQueueConnection() === 'sync'){
82 82
                         $queue = $container->get(ShortCircuit::class);
83
-                    } else {
83
+                    }else{
84 84
                         $queue = $container->get(QueueInterface::class);
85 85
                     }
86 86
 
87 87
                     return new MailQueue($config, $queue);
88 88
                 }
89 89
             );
90
-        } else {
90
+        }else{
91 91
             $container->bindSingleton(
92 92
                 MailerInterface::class,
93 93
                 static fn (MailerConfig $config, QueueConnectionProviderInterface $provider) => new MailQueue(
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             );
98 98
         }
99 99
 
100
-        if ($container->has(HandlerRegistryInterface::class)) {
100
+        if ($container->has(HandlerRegistryInterface::class)){
101 101
             $registry = $container->get(HandlerRegistryInterface::class);
102 102
             $registry->setHandler(MailQueue::JOB_NAME, MailJob::class);
103 103
         }
Please login to merge, or discard this patch.
Braces   +14 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@  discard block
 block discarded – undo
69 69
 
70 70
     public function start(Container $container): void
71 71
     {
72
-        if ($container->has(JobRegistry::class)) {
72
+        if ($container->has(JobRegistry::class))
73
+        {
73 74
             // Will be removed since v3.0
74 75
             $registry = $container->get(JobRegistry::class);
75 76
             $registry->setHandler(MailQueue::JOB_NAME, MailJobAdapter::class);
@@ -77,17 +78,23 @@  discard block
 block discarded – undo
77 78
 
78 79
             $container->bindSingleton(
79 80
                 MailerInterface::class,
80
-                static function (MailerConfig $config) use ($container) {
81
-                    if ($config->getQueueConnection() === 'sync') {
81
+                static function (MailerConfig $config) use ($container)
82
+                {
83
+                    if ($config->getQueueConnection() === 'sync')
84
+                    {
82 85
                         $queue = $container->get(ShortCircuit::class);
83
-                    } else {
86
+                    }
87
+                    else
88
+                    {
84 89
                         $queue = $container->get(QueueInterface::class);
85 90
                     }
86 91
 
87 92
                     return new MailQueue($config, $queue);
88 93
                 }
89 94
             );
90
-        } else {
95
+        }
96
+        else
97
+        {
91 98
             $container->bindSingleton(
92 99
                 MailerInterface::class,
93 100
                 static fn (MailerConfig $config, QueueConnectionProviderInterface $provider) => new MailQueue(
@@ -97,7 +104,8 @@  discard block
 block discarded – undo
97 104
             );
98 105
         }
99 106
 
100
-        if ($container->has(HandlerRegistryInterface::class)) {
107
+        if ($container->has(HandlerRegistryInterface::class))
108
+        {
101 109
             $registry = $container->get(HandlerRegistryInterface::class);
102 110
             $registry->setHandler(MailQueue::JOB_NAME, MailJob::class);
103 111
         }
Please login to merge, or discard this patch.