| Conditions | 4 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | protected function getContent() |
||
| 24 | { |
||
| 25 | if($this->user === false || $this->user === null) |
||
|
|
|||
| 26 | { |
||
| 27 | $this->content['body'] = ' |
||
| 28 | <div id="content"> |
||
| 29 | <div class="row"> |
||
| 30 | <div class="col-lg-12"> |
||
| 31 | <h1 class="page-header">You must <a href="'.$this->loginUrl.'?return='.$this->currentUrl().'">log in <span class="fa fa-sign-in"></span></a> to access the '.$this->content['pageTitle'].' system!</h1> |
||
| 32 | </div> |
||
| 33 | </div> |
||
| 34 | </div> |
||
| 35 | '; |
||
| 36 | } |
||
| 37 | else if(!isset($this->content['body'])) |
||
| 38 | { |
||
| 39 | $this->content['body'] = $this->body; |
||
| 40 | } |
||
| 41 | return $this->twig->render($this->templateName, $this->content); |
||
| 42 | } |
||
| 43 | } |
||
| 45 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: