1 | <?php |
||
14 | class StartSession extends \Illuminate\Session\Middleware\StartSession |
||
15 | { |
||
16 | /** |
||
17 | * @var Guard |
||
18 | */ |
||
19 | protected $auth; |
||
20 | |||
21 | /** |
||
22 | * Create a new session middleware. |
||
23 | * StartSession constructor. |
||
24 | * @param SessionManager $manager |
||
25 | * @param Guard $auth |
||
26 | */ |
||
27 | public function __construct(SessionManager $manager, Guard $auth) |
||
33 | |||
34 | /** |
||
35 | * @inheritdoc |
||
36 | */ |
||
37 | public function getSession(Request $request) |
||
44 | |||
45 | /** |
||
46 | * @param Request $request |
||
47 | * @return mixed |
||
48 | */ |
||
49 | protected function getSessionId(Request $request) |
||
53 | |||
54 | /** |
||
55 | * Handle an incoming request, but skip OPTIONS method |
||
56 | * |
||
57 | * @inheritdoc |
||
58 | */ |
||
59 | public function handle($request, Closure $next) |
||
67 | } |
||
68 |
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.