1 | <?php |
||
13 | final class Channel implements ChannelInterfce |
||
14 | { |
||
15 | private $connection; |
||
16 | private $number; |
||
17 | private $closed = false; |
||
18 | |||
19 | 3 | public function __construct(Connection $connection, Number $number) |
|
33 | |||
34 | 1 | public function exchange(): Exchange |
|
38 | |||
39 | 1 | public function queue(): Queue |
|
43 | |||
44 | 1 | public function basic(): Basic |
|
48 | |||
49 | 1 | public function transaction(): Transaction |
|
53 | |||
54 | 2 | public function closed(): bool |
|
58 | |||
59 | 1 | public function close(): void |
|
74 | } |
||
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: