Conditions | 4 |
Paths | 8 |
Total Lines | 16 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
53 | public static function create(array $data) |
||
54 | { |
||
55 | $bounce = new self($data['address']); |
||
56 | |||
57 | if (isset($data['code'])) { |
||
58 | $this->setCode($data['code']); |
||
|
|||
59 | } |
||
60 | if (isset($data['error'])) { |
||
61 | $this->setError($data['error']); |
||
62 | } |
||
63 | if (isset($data['created_at'])) { |
||
64 | $this->setCreatedAt(new \DateTime($data['created_at'])); |
||
65 | } |
||
66 | |||
67 | return $bounce; |
||
68 | } |
||
69 | |||
126 |
This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.