| Total Complexity | 6 |
| Total Lines | 47 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | abstract class TemplateHook implements HookInterface |
||
| 11 | { |
||
| 12 | protected Environment $templating; |
||
| 13 | public string|array $target; |
||
| 14 | public array $context; |
||
| 15 | |||
| 16 | public function __construct() |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * @return Environment |
||
| 25 | */ |
||
| 26 | public function getTemplating(): Environment |
||
| 27 | { |
||
| 28 | return $this->templating; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param array $context |
||
| 33 | * @return TemplateHook |
||
| 34 | */ |
||
| 35 | public function setContext(array $context): TemplateHook |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param Environment $env |
||
| 43 | * @return TemplateHook |
||
| 44 | */ |
||
| 45 | public function setEnvironment(Environment $env): TemplateHook |
||
| 46 | { |
||
| 47 | $this->templating = $env; |
||
| 48 | return $this; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @return array |
||
| 53 | */ |
||
| 54 | public function getContext(): array |
||
| 57 | } |
||
| 58 | |||
| 59 | } |