Conditions | 3 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
28 | private function getCurrentTemplate($template_slug) |
||
29 | { |
||
30 | if (is_null($template_slug)) { |
||
31 | $template = TemplateModel::where('active', true)->where('type', 'default')->first(); |
||
32 | } else { |
||
33 | $template = TemplateModel::where('slug', $template_slug)->first(); |
||
34 | } |
||
35 | |||
36 | if (is_null($template)) { |
||
37 | throw new Exception('Whoops! No Template Defined...'); |
||
|
|||
38 | } |
||
39 | |||
40 | return $template; |
||
41 | } |
||
61 |