| Total Complexity | 3 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | abstract class ListOfValues implements CriteriaInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected $values; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * ListOfValues constructor. |
||
| 23 | * |
||
| 24 | 1 | * @param string $valueList Comma separated sting of values |
|
| 25 | */ |
||
| 26 | 1 | final public function __construct($valueList) |
|
| 27 | 1 | { |
|
| 28 | $this->values = explode(',', $valueList); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Returns field name in schema. |
||
| 33 | * |
||
| 34 | * @return mixed |
||
| 35 | */ |
||
| 36 | abstract protected function getField(): string; |
||
| 37 | |||
| 38 | /** |
||
| 39 | 1 | * @return array |
|
| 40 | */ |
||
| 41 | 1 | public function getValues(): array |
|
| 42 | { |
||
| 43 | return $this->values; |
||
| 44 | } |
||
| 45 | |||
| 46 | /** |
||
| 47 | * @param Builder $model |
||
| 48 | * @param RepositoryInterface $repository |
||
| 49 | * |
||
| 50 | 1 | * @return Builder |
|
| 51 | */ |
||
| 52 | 1 | public function apply($model, RepositoryInterface $repository) //: Builder |
|
| 57 | } |
||
| 58 | } |
||
| 59 |