| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 3 | public function __construct(Connection $connection, Number $number) |
|
| 20 | { |
||
| 21 | 3 | $this->connection = $connection; |
|
| 22 | 3 | $this->number = $number; |
|
| 23 | |||
| 24 | $connection |
||
| 25 | 3 | ->send($connection->protocol()->channel()->open($number)) |
|
| 26 | 3 | ->wait('channel.open-ok'); |
|
| 27 | |||
| 28 | 3 | $this->exchange = new Exchange\Exchange($connection, $number); |
|
|
|
|||
| 29 | 3 | $this->queue = new Queue\Queue($connection, $number); |
|
| 30 | 3 | $this->basic = new Basic\Basic($connection, $number); |
|
| 31 | 3 | $this->transaction = new Transaction\Transaction($connection, $number); |
|
| 32 | 3 | } |
|
| 33 | |||
| 75 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: