1 | <?php |
||
29 | class RemoteVettingContext |
||
30 | { |
||
31 | const SESSION_KEY = 'remote-vetting-process'; |
||
32 | |||
33 | /** |
||
34 | * @var RemoteVettingState |
||
35 | */ |
||
36 | private $state; |
||
37 | /** |
||
38 | * @var SessionInterface |
||
39 | */ |
||
40 | private $session; |
||
41 | |||
42 | /** |
||
43 | * @param SessionInterface $session |
||
44 | */ |
||
45 | public function __construct(SessionInterface $session) |
||
50 | |||
51 | /** |
||
52 | * Do not use this method directly, this method is used to control state in the RemoteVettingState implementations. |
||
53 | * This is done in order to comply with the state machine design pattern. |
||
54 | * |
||
55 | * @param RemoteVettingState $newState |
||
56 | */ |
||
57 | public function setState(RemoteVettingState $newState) |
||
61 | |||
62 | /** |
||
63 | * @param string $identityProviderName |
||
64 | * @param RemoteVettingTokenDto $token |
||
65 | */ |
||
66 | public function initialize($identityProviderName, RemoteVettingTokenDto $token) |
||
71 | |||
72 | /** |
||
73 | * @param ProcessId $processId |
||
74 | */ |
||
75 | public function validating(ProcessId $processId) |
||
81 | |||
82 | /** |
||
83 | * @param ProcessId $processId |
||
84 | * @param AttributeListDto $xexternalAttributes |
||
85 | */ |
||
86 | public function validated(ProcessId $processId, AttributeListDto $xexternalAttributes) |
||
92 | |||
93 | /** |
||
94 | * @param ProcessId $processId |
||
95 | * @return RemoteVettingProcessDto |
||
96 | */ |
||
97 | public function done(ProcessId $processId) |
||
104 | |||
105 | /** |
||
106 | * @return RemoteVettingTokenDto |
||
107 | */ |
||
108 | public function getValidatedToken() |
||
113 | |||
114 | /** |
||
115 | * @return AttributeListDto |
||
116 | */ |
||
117 | public function getAttributes() |
||
122 | |||
123 | /** |
||
124 | * @return string |
||
125 | */ |
||
126 | public function getIdentityProviderSlug() |
||
131 | |||
132 | /** |
||
133 | * @return string |
||
134 | */ |
||
135 | public function getTokenId() |
||
140 | |||
141 | /** |
||
142 | * @return RemoteVettingProcessDto |
||
143 | */ |
||
144 | private function loadProcess() |
||
159 | |||
160 | /** |
||
161 | * @param RemoteVettingProcessDto $process |
||
162 | * @return void |
||
163 | */ |
||
164 | private function saveProcess(RemoteVettingProcessDto $process) |
||
170 | } |
||
171 |
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.