| Conditions | 2 |
| Paths | 1 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | function validatePathInclude($include, $file_exists = 'file_exists') { |
||
| 36 | return function($path, array $vars) use ($include, $file_exists) { |
||
| 37 | if (!$file_exists($path)) { |
||
| 38 | throw new Plates\Exception\PlatesException('Template path ' . $path . ' does not exist.'); |
||
| 39 | } |
||
| 40 | |||
| 41 | return $include($path, $vars); |
||
| 42 | }; |
||
| 43 | } |
||
| 44 | /** provieds a map of path -> includer */ |
||
| 54 |