| Conditions | 8 | 
| Paths | 20 | 
| Total Lines | 26 | 
| Code Lines | 16 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 26 | public function contact(\Base $f3, array $params = [])  | 
            ||
| 
                                                                                                    
                        
                         | 
                |||
| 27 |     { | 
            ||
| 28 | $page = new Mappers\Pages;  | 
            ||
| 29 | $page->load(['slug = ?', 'contact']);  | 
            ||
| 30 | |||
| 31 | // conditions if page is viewable  | 
            ||
| 32 | $publishTime = strtotime($page->published);  | 
            ||
| 33 | $expireTime = strtotime($page->expires);  | 
            ||
| 34 |         $showPage = $f3->get('REQUEST.preview') || ( | 
            ||
| 35 | 'published' == $page->status &&  | 
            ||
| 36 | 'public' == $page->scopes &&  | 
            ||
| 37 | 'page' == $page->category &&  | 
            ||
| 38 | time() > $publishTime &&  | 
            ||
| 39 | (0 >= $expireTime || $expireTime > time())  | 
            ||
| 40 | );  | 
            ||
| 41 | |||
| 42 |         if (!$showPage) { | 
            ||
| 43 | // 404  | 
            ||
| 44 | echo 'page unavailable';  | 
            ||
| 45 | die(404);  | 
            ||
| 46 | }  | 
            ||
| 47 | |||
| 48 |         $f3->set('pagesMapper', $page); | 
            ||
| 49 | |||
| 50 | echo \View::instance()->render($this->template_path . '/contact.phtml');  | 
            ||
| 51 | }  | 
            ||
| 52 | |||
| 68 | 
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.