| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2.0185 |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 12 | 2 | public function __construct(string $template, array $paths) |
|
| 13 | { |
||
| 14 | 2 | $message = sprintf('The template, "%s" was not found.', $template); |
|
| 15 | |||
| 16 | 2 | if (count($paths) > 0) { |
|
| 17 | 2 | $message .= sprintf(' Looked inside these paths (in this order): %s', implode(', ', $paths)); |
|
| 18 | } else { |
||
| 19 | $message .= ' No paths has been added to the engine. Use the Setono\PhpTemplates\Engine\EngineInterface::addPath() method to do so.'; |
||
| 20 | } |
||
| 21 | |||
| 22 | 2 | parent::__construct($message); |
|
| 23 | 2 | } |
|
| 25 |