| Total Complexity | 5 |
| Total Lines | 52 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class DefaultContext implements ContextInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string[] |
||
| 11 | */ |
||
| 12 | private $path = []; |
||
| 13 | /** |
||
| 14 | * @var bool |
||
| 15 | */ |
||
| 16 | private $ignoreUnknownParameters = false; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @return string[] |
||
| 20 | */ |
||
| 21 | public function getPath(): array |
||
| 22 | { |
||
| 23 | return $this->path; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string[] $path |
||
| 28 | * @return $this |
||
| 29 | */ |
||
| 30 | public function setPath(array $path) |
||
| 31 | { |
||
| 32 | $this->path = $path; |
||
| 33 | return $this; |
||
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | public function shouldIgnoreUnknownParameters(): bool |
||
| 40 | { |
||
| 41 | return $this->ignoreUnknownParameters; |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param bool $ignoreUnknownParameters |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | public function setIgnoreUnknownParameters(bool $ignoreUnknownParameters) |
||
| 52 | } |
||
| 53 | |||
| 54 | public static function from(ContextInterface $context): DefaultContext |
||
| 55 | { |
||
| 61 |