| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 62 | 8 | public function render() |
|
| 63 | { |
||
| 64 | 8 | $event = new BeforeRenderEvent($this->frontPath); |
|
| 65 | 8 | $this->dispatcher->dispatch(FrontRenderEvents::BEFORE_RENDER, $event); |
|
| 66 | |||
| 67 | 8 | $frontPath = $event->getFrontPath(); |
|
| 68 | 8 | if (empty($frontPath)) { |
|
| 69 | 1 | throw new FrontRenderException('You need to configure a front path.'); |
|
| 70 | } |
||
| 71 | |||
| 72 | 7 | return $this->engine->render($frontPath, $this->parameters); |
|
| 73 | } |
||
| 74 | } |
||
| 75 |