Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function testExchange() |
||
12 | { |
||
13 | global $rabbitmq_host; |
||
|
|||
14 | global $rabbitmq_port; |
||
15 | global $rabbitmq_user; |
||
16 | global $rabbitmq_password; |
||
17 | |||
18 | $client = new Client($rabbitmq_host, $rabbitmq_port, $rabbitmq_user, $rabbitmq_password); |
||
19 | $client->setPrefetchCount(1); |
||
20 | |||
21 | $exchange = new Exchange('test_exchange', 'fanout'); |
||
22 | |||
23 | |||
24 | } |
||
25 | } |
||
26 |
Instead of relying on
global
state, we recommend one of these alternatives:1. Pass all data via parameters
2. Create a class that maintains your state