Completed
Push — health2 ( 48fe49 )
by
unknown
45s
created
src/SWP/Bundle/CoreBundle/Check/CustomHealthCheck.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
                 $status['postgres'] = 'green';
46 46
             }
47 47
         } catch (\Throwable $e) {
48
-            error_log('PostgreSQL health check failed: ' . $e->getMessage());
48
+            error_log('PostgreSQL health check failed: '.$e->getMessage());
49 49
             $status['postgres'] = 'red';
50 50
         }
51 51
 
@@ -54,20 +54,20 @@  discard block
 block discarded – undo
54 54
             $this->elasticaClient->getStatus();
55 55
             $status['elasticsearch'] = 'green';
56 56
         } catch (\Throwable $e) {
57
-            error_log('Elasticsearch health check failed: ' . $e->getMessage());
57
+            error_log('Elasticsearch health check failed: '.$e->getMessage());
58 58
             $status['elasticsearch'] = 'red';
59 59
         }
60 60
 
61 61
         // Check Memcached
62 62
         try {
63
-            $cacheKey = 'health_check_' . uniqid();
63
+            $cacheKey = 'health_check_'.uniqid();
64 64
             $cacheItem = $this->cachePool->getItem($cacheKey);
65 65
             $cacheItem->set('ok');
66 66
             $this->cachePool->save($cacheItem);
67 67
             $this->cachePool->deleteItem($cacheKey);
68 68
             $status['memcached'] = 'green';
69 69
         } catch (\Throwable $e) {
70
-            error_log('Memcached health check failed: ' . $e->getMessage());
70
+            error_log('Memcached health check failed: '.$e->getMessage());
71 71
             $status['memcached'] = 'red';
72 72
         }
73 73
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         try {
76 76
             $amqp = new \AMQPConnection([
77 77
                 'host'     => $_ENV['RABBIT_MQ_HOST'] ?? 'localhost',
78
-                'port'     => (int)($_ENV['RABBIT_MQ_PORT'] ?? 5672),
78
+                'port'     => (int) ($_ENV['RABBIT_MQ_PORT'] ?? 5672),
79 79
                 'login'    => $_ENV['RABBIT_MQ_USER'] ?? 'guest',
80 80
                 'password' => $_ENV['RABBIT_MQ_PASSWORD'] ?? 'guest',
81 81
                 'vhost'    => $_ENV['RABBIT_MQ_VHOST'] ?? '/',
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 $status['rabbitmq'] = 'green';
86 86
             }
87 87
         } catch (\Throwable $e) {
88
-            error_log('RabbitMQ health check failed: ' . $e->getMessage());
88
+            error_log('RabbitMQ health check failed: '.$e->getMessage());
89 89
             $status['rabbitmq'] = 'red';
90 90
         }
91 91
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
                 $status['supervisor'] = 'red';
121 121
             }
122 122
         } catch (\Throwable $e) {
123
-            error_log('Supervisor health check failed: ' . $e->getMessage());
123
+            error_log('Supervisor health check failed: '.$e->getMessage());
124 124
             $status['supervisor'] = 'red';
125 125
         }
126 126
 
Please login to merge, or discard this patch.