| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function boot() |
||
| 20 | { |
||
| 21 | if (App::environment('production')) { |
||
|
|
|||
| 22 | URL::forceScheme('https'); |
||
| 23 | } |
||
| 24 | |||
| 25 | Auth::macro('student', function () { |
||
| 26 | return Auth::check() ? Auth::user()->student : null; |
||
| 27 | }); |
||
| 28 | |||
| 29 | Validator::extend('student_number', function ($attribute, $value, $parameters, $validator) { |
||
| 30 | return preg_match('/^(a|pg)[0-9]+$/i', $value) === 1; |
||
| 31 | }); |
||
| 48 |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.