| Total Complexity | 3 |
| Total Lines | 36 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | final class Get |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var string |
||
| 12 | */ |
||
| 13 | private $alias; |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | private $index; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Get constructor. |
||
| 21 | * @param string $alias |
||
| 22 | * @param string $index |
||
| 23 | */ |
||
| 24 | 15 | public function __construct(string $alias, string $index = '*') |
|
| 28 | 15 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return array |
||
| 32 | */ |
||
| 33 | 15 | public function toArray() |
|
| 34 | { |
||
| 35 | return [ |
||
| 36 | 15 | 'index' => $this->index, |
|
| 37 | 15 | 'name' => $this->alias, |
|
| 38 | ]; |
||
| 39 | } |
||
| 40 | |||
| 41 | 15 | public static function anyIndex(string $alias): Get |
|
| 44 | } |
||
| 45 | } |
||
| 46 |