Completed
Push — health2 ( 3ea4fc )
by
unknown
42s
created
src/SWP/Bundle/SymfonyHealthCheckBundle/Controller/HealthController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
                 $status['postgres'] = 'green';
36 36
             }
37 37
         } catch (\Throwable $e) {
38
-            error_log('PostgreSQL health check failed: ' . $e->getMessage());
38
+            error_log('PostgreSQL health check failed: '.$e->getMessage());
39 39
             $status['postgres'] = 'red';
40 40
         }
41 41
 
@@ -44,20 +44,20 @@  discard block
 block discarded – undo
44 44
             $elasticaClient->getStatus();
45 45
             $status['elasticsearch'] = 'green';
46 46
         } catch (\Throwable $e) {
47
-            error_log('Elasticsearch health check failed: ' . $e->getMessage());
47
+            error_log('Elasticsearch health check failed: '.$e->getMessage());
48 48
             $status['elasticsearch'] = 'red';
49 49
         }
50 50
 
51 51
         // Check Memcached
52 52
         try {
53
-            $cacheKey = 'health_check_' . uniqid();
53
+            $cacheKey = 'health_check_'.uniqid();
54 54
             $cacheItem = $cachePool->getItem($cacheKey);
55 55
             $cacheItem->set('ok');
56 56
             $cachePool->save($cacheItem);
57 57
             $cachePool->deleteItem($cacheKey);
58 58
             $status['memcached'] = 'green';
59 59
         } catch (\Throwable $e) {
60
-            error_log('Memcached health check failed: ' . $e->getMessage());
60
+            error_log('Memcached health check failed: '.$e->getMessage());
61 61
             $status['memcached'] = 'red';
62 62
         }
63 63
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         try {
66 66
             $amqp = new \AMQPConnection([
67 67
                 'host'     => $_ENV['RABBIT_MQ_HOST'] ?? 'localhost',
68
-                'port'     => (int)($_ENV['RABBIT_MQ_PORT'] ?? 5672),
68
+                'port'     => (int) ($_ENV['RABBIT_MQ_PORT'] ?? 5672),
69 69
                 'login'    => $_ENV['RABBIT_MQ_USER'] ?? 'guest',
70 70
                 'password' => $_ENV['RABBIT_MQ_PASSWORD'] ?? 'guest',
71 71
                 'vhost'    => $_ENV['RABBIT_MQ_VHOST'] ?? '/',
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
                 $status['rabbitmq'] = 'green';
76 76
             }
77 77
         } catch (\Throwable $e) {
78
-            error_log('RabbitMQ health check failed: ' . $e->getMessage());
78
+            error_log('RabbitMQ health check failed: '.$e->getMessage());
79 79
             $status['rabbitmq'] = 'red';
80 80
         }
81 81
 
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
                 $status['supervisor'] = 'red';
111 111
             }
112 112
         } catch (\Throwable $e) {
113
-            error_log('Supervisor health check failed: ' . $e->getMessage());
113
+            error_log('Supervisor health check failed: '.$e->getMessage());
114 114
             $status['supervisor'] = 'red';
115 115
         }
116 116
 
Please login to merge, or discard this patch.