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