| Conditions | 3 |
| Paths | 3 |
| Total Lines | 22 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 45 | public function authenticate() |
||
| 46 | { |
||
| 47 | $credentials = $this->rememberMeCookie->read(); |
||
|
|
|||
| 48 | |||
| 49 | if ($credentials !== false) { |
||
| 50 | $session = $this->rememberMeSessionModel->find($credentials['token'], $credentials['sequence']); |
||
| 51 | |||
| 52 | if (!empty($session)) { |
||
| 53 | $this->rememberMeCookie->write( |
||
| 54 | $session['token'], |
||
| 55 | $this->rememberMeSessionModel->updateSequence($session['token']), |
||
| 56 | $session['expiration'] |
||
| 57 | ); |
||
| 58 | |||
| 59 | $this->userInfo = $this->userModel->getById($session['user_id']); |
||
| 60 | |||
| 61 | return true; |
||
| 62 | } |
||
| 63 | } |
||
| 64 | |||
| 65 | return false; |
||
| 66 | } |
||
| 67 | |||
| 82 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.