| @@ 26-33 (lines=8) @@ | ||
| 23 | ||
| 24 | private $strategies; |
|
| 25 | ||
| 26 | public function __construct(TypedCollectionInterface $strategies = null) |
|
| 27 | { |
|
| 28 | $this->strategies = $strategies ?? $this->all(); |
|
| 29 | ||
| 30 | if ($this->strategies->getType() !== ExtractionStrategyInterface::class) { |
|
| 31 | throw new InvalidArgumentException; |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||
| 35 | public function all(): TypedCollectionInterface |
|
| 36 | { |
|
| @@ 26-33 (lines=8) @@ | ||
| 23 | ||
| 24 | private $strategies; |
|
| 25 | ||
| 26 | public function __construct(TypedCollectionInterface $strategies = null) |
|
| 27 | { |
|
| 28 | $this->strategies = $strategies ?? $this->all(); |
|
| 29 | ||
| 30 | if ($this->strategies->getType() !== InjectionStrategyInterface::class) { |
|
| 31 | throw new InvalidArgumentException; |
|
| 32 | } |
|
| 33 | } |
|
| 34 | ||
| 35 | public function all(): TypedCollectionInterface |
|
| 36 | { |
|