| Total Complexity | 9 |
| Total Lines | 89 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class DefaultContext implements ContextInterface |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string[] |
||
| 11 | */ |
||
| 12 | private $views = []; |
||
| 13 | /** |
||
| 14 | * @var bool |
||
| 15 | */ |
||
| 16 | private $validate = true; |
||
| 17 | /** |
||
| 18 | * @var bool |
||
| 19 | */ |
||
| 20 | private $strictMode = false; |
||
| 21 | /** |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | private $rootMapping = true; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @return bool |
||
| 28 | */ |
||
| 29 | public function isRootMapping(): bool |
||
| 30 | { |
||
| 31 | return $this->rootMapping; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param bool $rootMapping |
||
| 36 | * @return $this |
||
| 37 | */ |
||
| 38 | public function setRootMapping(bool $rootMapping) |
||
| 39 | { |
||
| 40 | $this->rootMapping = $rootMapping; |
||
| 41 | return $this; |
||
| 42 | } |
||
| 43 | /** |
||
| 44 | * @inheritDoc |
||
| 45 | */ |
||
| 46 | public function useStrictMode(): bool |
||
| 47 | { |
||
| 48 | return $this->strictMode; |
||
| 49 | } |
||
| 50 | |||
| 51 | public function setStrictMode(bool $value): DefaultContext |
||
| 52 | { |
||
| 53 | $this->strictMode = $value; |
||
| 54 | return $this; |
||
| 55 | } |
||
| 56 | |||
| 57 | /** |
||
| 58 | * @inheritDoc |
||
| 59 | */ |
||
| 60 | public function useValidation(): bool |
||
| 63 | } |
||
| 64 | |||
| 65 | public function setValidation(bool $value): DefaultContext |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @param string[] $views |
||
| 73 | * @return $this |
||
| 74 | */ |
||
| 75 | public function setViews(array $views) |
||
| 76 | { |
||
| 77 | $this->views = $views; |
||
| 78 | return $this; |
||
| 79 | } |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @inheritDoc |
||
| 83 | */ |
||
| 84 | public function getViews(): array |
||
| 87 | } |
||
| 88 | |||
| 89 | public static function from(ContextInterface $context): DefaultContext |
||
| 90 | { |
||
| 96 | } |
||
| 97 | } |
||
| 98 |