| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 46 | public function authenticate() |
||
| 47 | { |
||
| 48 | $username = $this->request->getRemoteUser(); |
||
|
|
|||
| 49 | |||
| 50 | if (!empty($username)) { |
||
| 51 | $userProfile = $this->userModel->getByUsername($username); |
||
| 52 | $this->userInfo = new ReverseProxyUserProvider($username, $userProfile ?: []); |
||
| 53 | |||
| 54 | return true; |
||
| 55 | } |
||
| 56 | |||
| 57 | return false; |
||
| 58 | } |
||
| 59 | |||
| 80 |
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.