| Conditions | 4 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function bootstrap(Magister $app) |
||
| 21 | { |
||
| 22 | if ($app->auth->check()) { |
||
|
|
|||
| 23 | // Temporary compatibility fix. |
||
| 24 | if (!is_null($app->auth->user()) && is_null($app->auth->id())) { |
||
| 25 | $app->config->replace('url', 'id', $app->auth->user()->Id); |
||
| 26 | } else { |
||
| 27 | $app->config->replace('url', 'id', $app->auth->id()); |
||
| 28 | } |
||
| 29 | $app->config->replace('url', 'enrollment', Enrollment::current()->Id); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | } |
||
| 33 |
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.