1 | <?php |
||
9 | abstract class Model extends IlluminateModel |
||
10 | { |
||
11 | use AutoCache, AutoValidate; |
||
12 | |||
13 | /** |
||
14 | * Toggle the auto cache feature. |
||
15 | * |
||
16 | * @var int |
||
17 | */ |
||
18 | const AUTO_CACHE_ENABLED = true; |
||
19 | |||
20 | /** |
||
21 | * A method best used to register Eloquent events when the model boots up |
||
22 | * @return void |
||
23 | */ |
||
24 | 6 | protected static function boot() |
|
44 | } |
||
45 |
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.
In this case you can add the
@ignore
PhpDoc annotation to the duplicate definition and it will be ignored.