Conditions | 5 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | public static function getChannel() |
||
53 | { |
||
54 | if (empty(self::$channel) || (!empty(self::$channel) && !self::$channel->is_open())) { |
||
55 | try { |
||
56 | self::$channel = self::getInstance()->channel(); |
||
57 | } catch (\Exception $exception) { |
||
58 | die('Connection error RabbitMQ' . $exception->getMessage()); |
||
|
|||
59 | } |
||
60 | } |
||
61 | |||
62 | return self::$channel; |
||
63 | } |
||
90 |
In general, usage of exit should be done with care and only when running in a scripting context like a CLI script.