| Total Complexity | 4 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | final class SelectResult implements SelectResultInterface |
||
| 14 | { |
||
| 15 | |||
| 16 | private $encoder; |
||
| 17 | |||
| 18 | private $decoder; |
||
| 19 | |||
| 20 | private $values; |
||
| 21 | |||
| 22 | 7 | public function __construct( |
|
| 30 | 7 | } |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritDoc} |
||
| 34 | * |
||
| 35 | * @return array |
||
| 36 | */ |
||
| 37 | 2 | public function decode(): array |
|
| 38 | { |
||
| 39 | 2 | return array_map([$this->decoder, 'exportValue'], $this->values); |
|
| 40 | } |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritDoc} |
||
| 44 | * |
||
| 45 | * @return string[] |
||
| 46 | */ |
||
| 47 | 3 | public function encode(): array |
|
| 48 | { |
||
| 49 | 3 | return array_map([$this->encoder, 'exportValue'], $this->values); |
|
| 50 | } |
||
| 51 | |||
| 52 | /** |
||
| 53 | * {@inheritDoc} |
||
| 54 | * |
||
| 55 | * @return ValueInterface[] |
||
| 56 | */ |
||
| 57 | 2 | public function get(): array |
|
| 60 | } |
||
| 61 | } |
||
| 62 |