| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 50 | protected function selectUser($username, $password) |
||
| 51 | { |
||
| 52 | $adapter = new Intraface_Auth_User($this->mdb2, $this->session()->sessionId(), $username, $password); |
||
| 53 | |||
| 54 | // $this->auth->attachObserver($this->log); |
||
| 55 | $this->auth->authenticate($adapter); |
||
| 56 | |||
| 57 | if (!$this->auth->hasIdentity()) { |
||
| 58 | return false; |
||
| 59 | } |
||
| 60 | |||
| 61 | return new Intraface_AuthenticatedUser($username, $this->language()); |
||
| 62 | } |
||
| 63 | } |
||
| 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: