| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 1 | public static function create($view, $name) |
|
| 21 | { |
||
| 22 | 1 | $class = self::getHelperClass($name); |
|
| 23 | 1 | if (!class_exists($class)) { |
|
| 24 | throw new HelperNotFoundException("No helper name [{$name}] found for view engine."); |
||
| 25 | } |
||
| 26 | 1 | $helper = new $class(); |
|
| 27 | 1 | $helper->setView($view); |
|
| 28 | |||
| 29 | 1 | return $helper; |
|
| 30 | } |
||
| 58 |