Passed
Pull Request — master (#687)
by butschster
08:45
created
src/SendIt/src/Bootloader/MailerBootloader.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function start(Container $container): void
70 70
     {
71
-        if ($container->has(JobRegistry::class)) {
71
+        if ($container->has(JobRegistry::class)){
72 72
             // Will be removed since v3.0
73 73
             $registry = $container->get(JobRegistry::class);
74 74
             $registry->setHandler(MailQueue::JOB_NAME, \Spiral\SendIt\Jobs\MailJobAdapter::class);
@@ -77,19 +77,19 @@  discard block
 block discarded – undo
77 77
             $container->bindSingleton(
78 78
                 MailerInterface::class,
79 79
                 static function (MailerConfig $config) use ($container) {
80
-                    if ($config->getQueueConnection() === 'sync') {
80
+                    if ($config->getQueueConnection() === 'sync'){
81 81
                         $queue = $container->get(ShortCircuit::class);
82
-                    } else {
82
+                    }else{
83 83
                         $queue = $container->get(QueueInterface::class);
84 84
                     }
85 85
 
86 86
                     return new MailQueue($config, $queue);
87 87
                 }
88 88
             );
89
-        } else {
89
+        }else{
90 90
             $container->bindSingleton(
91 91
                 MailerInterface::class,
92
-                static function (MailerConfig $config, QueueConnectionProviderInterface $provider) {
92
+                static function (MailerConfig $config, QueueConnectionProviderInterface $provider){
93 93
                     return new MailQueue(
94 94
                         $config,
95 95
                         $provider->getConnection($config->getQueueConnection())
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             );
99 99
         }
100 100
 
101
-        if ($container->has(HandlerRegistryInterface::class)) {
101
+        if ($container->has(HandlerRegistryInterface::class)){
102 102
             $registry = $container->get(HandlerRegistryInterface::class);
103 103
             $registry->setHandler(MailQueue::JOB_NAME, \Spiral\SendIt\MailJob::class);
104 104
         }
Please login to merge, or discard this patch.
Braces   +16 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,7 +68,8 @@  discard block
 block discarded – undo
68 68
 
69 69
     public function start(Container $container): void
70 70
     {
71
-        if ($container->has(JobRegistry::class)) {
71
+        if ($container->has(JobRegistry::class))
72
+        {
72 73
             // Will be removed since v3.0
73 74
             $registry = $container->get(JobRegistry::class);
74 75
             $registry->setHandler(MailQueue::JOB_NAME, \Spiral\SendIt\Jobs\MailJobAdapter::class);
@@ -76,20 +77,27 @@  discard block
 block discarded – undo
76 77
 
77 78
             $container->bindSingleton(
78 79
                 MailerInterface::class,
79
-                static function (MailerConfig $config) use ($container) {
80
-                    if ($config->getQueueConnection() === 'sync') {
80
+                static function (MailerConfig $config) use ($container)
81
+                {
82
+                    if ($config->getQueueConnection() === 'sync')
83
+                    {
81 84
                         $queue = $container->get(ShortCircuit::class);
82
-                    } else {
85
+                    }
86
+                    else
87
+                    {
83 88
                         $queue = $container->get(QueueInterface::class);
84 89
                     }
85 90
 
86 91
                     return new MailQueue($config, $queue);
87 92
                 }
88 93
             );
89
-        } else {
94
+        }
95
+        else
96
+        {
90 97
             $container->bindSingleton(
91 98
                 MailerInterface::class,
92
-                static function (MailerConfig $config, QueueConnectionProviderInterface $provider) {
99
+                static function (MailerConfig $config, QueueConnectionProviderInterface $provider)
100
+                {
93 101
                     return new MailQueue(
94 102
                         $config,
95 103
                         $provider->getConnection($config->getQueueConnection())
@@ -98,7 +106,8 @@  discard block
 block discarded – undo
98 106
             );
99 107
         }
100 108
 
101
-        if ($container->has(HandlerRegistryInterface::class)) {
109
+        if ($container->has(HandlerRegistryInterface::class))
110
+        {
102 111
             $registry = $container->get(HandlerRegistryInterface::class);
103 112
             $registry->setHandler(MailQueue::JOB_NAME, \Spiral\SendIt\MailJob::class);
104 113
         }
Please login to merge, or discard this patch.