Conditions | 4 |
Paths | 8 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 4 |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
52 | 26 | public function __construct($type, $data = null) |
|
53 | { |
||
54 | 26 | $this->type = $type; |
|
55 | 26 | $this->data = $data; |
|
56 | |||
57 | 26 | if ($this->getType() == self::TYPE_TRUE) { |
|
58 | 2 | $this->data = true; |
|
59 | 2 | } |
|
60 | |||
61 | 26 | if ($this->getType() == self::TYPE_FALSE) { |
|
62 | 1 | $this->data = false; |
|
63 | 1 | } |
|
64 | |||
65 | 26 | if ($this->getType() == self::TYPE_NULL) { |
|
66 | 2 | $this->data = null; |
|
67 | 2 | } |
|
68 | |||
69 | 26 | } |
|
70 | |||
103 | } |