| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 19 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 58 | return (new Str(decbin(ord((string) $bit)))) |
|
| 36 | 58 | ->chunk() |
|
| 37 | 58 | ->reduce( |
|
| 38 | 58 | $bits, |
|
| 39 | 58 | static function(Seq $bits, Str $bit): Seq { |
|
| 40 | 58 | return $bits->add((int) (string) $bit); |
|
| 41 | 58 | } |
|
| 42 | ); |
||
| 43 | 58 | } |
|
| 44 | ) |
||
| 45 | 58 | ->map(static function(int $bit): bool { |
|
| 46 | 58 | return (bool) $bit; |
|
| 47 | 58 | }) |
|
| 48 | 58 | ->reverse() |
|
| 49 | ); |
||
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return StreamInterface<bool> |
||
| 54 | */ |
||
| 55 | 44 | public function original(): StreamInterface |
|
| 56 | { |
||
| 57 | 44 | return $this->original; |
|
| 58 | } |
||
| 76 |