| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | function postForm() |
||
| 39 | { |
||
| 40 | $user = $this->selectUser($this->body('email'), $this->body('password')); |
||
| 41 | if ($user) { |
||
| 42 | $this->session()->set('intraface_identity', $user); |
||
| 43 | return new k_SeeOther($this->query('continue')); |
||
| 44 | } else { |
||
| 45 | return new k_SeeOther($this->url(null, array('flare' => 'Wrong credentials'))); |
||
| 46 | } |
||
| 47 | return $this->render(); |
||
| 48 | } |
||
| 49 | |||
| 64 |
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: