| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 48 | public function renderPage($page, array $params = []) |
||
| 49 | { |
||
| 50 | if ($page->layout) { |
||
| 51 | $this->layout = $page->layout; |
||
| 52 | } |
||
| 53 | |||
| 54 | if ($page->title) { |
||
| 55 | $this->view->title = Html::encode($page->title); |
||
| 56 | } |
||
| 57 | |||
| 58 | $this->view->params = $page->getData(); |
||
| 59 | |||
| 60 | return $this->renderContent($page->render($params)); |
||
| 61 | } |
||
| 62 | |||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: