| Total Complexity | 4 |
| Total Lines | 28 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class State |
||
| 8 | { |
||
| 9 | /** @var array */ |
||
| 10 | protected $array; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | protected $string; |
||
| 14 | |||
| 15 | 9 | public function __construct(Grid $grid) |
|
| 16 | { |
||
| 17 | 9 | $this->array = $grid->toArray(); |
|
| 18 | |||
| 19 | 9 | $this->string = $grid->__toString(); |
|
| 20 | 9 | } |
|
| 21 | |||
| 22 | 3 | public function toArray(): array |
|
| 23 | { |
||
| 24 | 3 | return $this->array; |
|
| 25 | } |
||
| 26 | |||
| 27 | 3 | public function toHash(): string |
|
| 30 | } |
||
| 31 | |||
| 32 | 3 | public function __toString() |
|
| 35 | } |
||
| 36 | } |
||
| 37 |