| Total Complexity | 7 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | class RequestDependentTestBag implements RequestDependentTestBagInterface, ProviderAwareInterface |
||
| 21 | { |
||
| 22 | use ProviderAwareTrait; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array |
||
| 26 | */ |
||
| 27 | private $map = []; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @param array $map |
||
| 31 | */ |
||
| 32 | 13 | public function __construct(array $map) |
|
| 33 | { |
||
| 34 | 13 | foreach ($map as $item) { |
|
| 35 | 13 | $this->add(...$item); |
|
|
|
|||
| 36 | } |
||
| 37 | 13 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * {@inheritdoc} |
||
| 41 | */ |
||
| 42 | 7 | public function getTests(RequestContext $requestContext) |
|
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * @param TestInterface[] $tests |
||
| 56 | * @param RequestConstraintInterface|null $constraint |
||
| 57 | */ |
||
| 58 | 13 | private function add(array $tests, RequestConstraintInterface $constraint = null) |
|
| 63 |