1 | <?php |
||
8 | class CacheUserTokenDecorator extends BaseCacheDecorator implements UserTokenRepository |
||
9 | { |
||
10 | /** |
||
11 | * @var UserTokenRepository |
||
12 | */ |
||
13 | protected $repository; |
||
14 | |||
15 | public function __construct(UserTokenRepository $repository) |
||
21 | |||
22 | /** |
||
23 | * Get all tokens for the given user |
||
24 | * @param int $userId |
||
25 | * @return \Illuminate\Database\Eloquent\Collection |
||
26 | */ |
||
27 | public function allForUser($userId) |
||
37 | |||
38 | /** |
||
39 | * @param int $userId |
||
40 | * @return \Modules\User\Entities\UserToken |
||
41 | */ |
||
42 | public function generateFor($userId) |
||
48 | } |
||
49 |
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.