| Conditions | 3 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 2 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | public function __construct($templates = null, array $helpers = []) |
||
| 51 | { |
||
| 52 | $this->configs = [ |
||
| 53 | ViewConfig::class => new ViewConfig, |
||
| 54 | ViewHelperConfig::class => new ViewHelperConfig |
||
| 55 | ]; |
||
| 56 | |||
| 57 | if ($templates) { |
||
| 58 | $this->view()->addTemplatePath($templates); |
||
| 59 | } |
||
| 60 | |||
| 61 | 9 | if ($helpers) { |
|
| 62 | $this->helper()->addHelpers($helpers); |
||
| 63 | } |
||
| 64 | 9 | } |
|
| 65 | 9 | ||
| 91 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.