| Total Complexity | 5 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | final class EmailTransformer implements Packable, Unpackable |
||
|
|
|||
| 20 | { |
||
| 21 | private $type; |
||
| 22 | |||
| 23 | public function __construct(int $type) |
||
| 24 | { |
||
| 25 | $this->type = $type; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function getType() : int |
||
| 29 | { |
||
| 30 | return $this->type; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function pack(Packer $packer, $value) : ?string |
||
| 38 | } |
||
| 39 | |||
| 40 | public function unpack(BufferUnpacker $unpacker, int $extLength) : Email |
||
| 43 | } |
||
| 44 | } |
||
| 45 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.