Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2.0054 |
Changes | 0 |
1 | <?php |
||
88 | 6 | public function getConnect(): AMQPConnection |
|
89 | { |
||
90 | 6 | if (!class_exists('PhpAmqpLib\Connection\AMQPConnection')) { |
|
91 | throw new FeatureRequired('PhpAmqpLib is not installed'); |
||
92 | } |
||
93 | |||
94 | 6 | return new AMQPConnection( |
|
95 | 6 | $this->host, |
|
96 | 6 | $this->port, |
|
97 | 6 | $this->user, |
|
98 | 6 | $this->password, |
|
99 | 6 | $this->vhost |
|
100 | ); |
||
103 |