| Total Complexity | 10 |
| Total Lines | 63 |
| Duplicated Lines | 0 % |
| Coverage | 84.21% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | class HelpersCollection extends AbstractCollection |
||
| 16 | { |
||
| 17 | protected static $instance = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var View |
||
| 21 | */ |
||
| 22 | protected $engine = null; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @return mixed |
||
| 26 | */ |
||
| 27 | 2 | public function getHelper($name) |
|
| 34 | } |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @return bool |
||
| 38 | */ |
||
| 39 | public function hasHelper($name) |
||
| 40 | 2 | { |
|
| 41 | if (!$this->has($name)) { |
||
| 42 | 2 | $this->initHelper($name); |
|
| 43 | 2 | } |
|
| 44 | |||
| 45 | return is_object($this->get($name, null)); |
||
| 46 | 2 | } |
|
| 47 | |||
| 48 | public function initHelper($name) |
||
| 56 | } |
||
| 57 | |||
| 58 | public function getEngine(): View |
||
| 61 | } |
||
| 62 | |||
| 63 | public function setEngine(View $engine): void |
||
| 66 | } |
||
| 67 | 2 | ||
| 68 | /** |
||
| 69 | * @return self |
||
| 70 | */ |
||
| 71 | public static function getInstance() |
||
| 80 |