Conditions | 3 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
60 | 182 | public function __toString(): string |
|
61 | { |
||
62 | 182 | if (\is_null($this->value)) { |
|
63 | 182 | $value = 0; |
|
64 | |||
65 | 182 | foreach ($this->original as $i => $bit) { |
|
66 | 182 | $bit = (int) $bit; |
|
67 | 182 | $value |= $bit << $i; |
|
68 | } |
||
69 | |||
70 | 182 | $this->value = \chr($value); |
|
71 | } |
||
72 | |||
73 | 182 | return $this->value; |
|
74 | } |
||
76 |