| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | 12 | public function __construct(bool $first, bool ...$bits) |
|
| 20 | { |
||
| 21 | 12 | array_unshift($bits, $first); |
|
| 22 | 12 | $value = 0; |
|
| 23 | 12 | $stream = new Stream('bool'); |
|
| 24 | |||
| 25 | 12 | foreach ($bits as $i => $bit) { |
|
| 26 | 12 | $stream = $stream->add($bit); |
|
| 27 | 12 | $bit = (int) $bit; |
|
| 28 | 12 | $value |= $bit << $i; |
|
| 29 | } |
||
| 30 | |||
| 31 | 12 | $this->value = chr($value); |
|
| 32 | 12 | $this->original = $stream; |
|
| 33 | 12 | } |
|
| 34 | |||
| 79 |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.