1 | <?php |
||
12 | final class LarsignService |
||
13 | { |
||
14 | private $options; |
||
15 | |||
16 | 2 | public function __construct(array $options = array()) |
|
20 | |||
21 | 2 | private function normalizeOptions(array $options = array()) |
|
31 | |||
32 | /** |
||
33 | * Get header name |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | 2 | public function getHeaderName() |
|
41 | |||
42 | /** |
||
43 | * Get access key |
||
44 | * |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getAccessKey() |
||
51 | |||
52 | /** |
||
53 | * Signature |
||
54 | * |
||
55 | * @param string $data |
||
56 | * @return string |
||
57 | */ |
||
58 | 2 | public function sign($data) |
|
63 | |||
64 | /** |
||
65 | * Signature with data |
||
66 | * |
||
67 | * @param string $data |
||
68 | * @return string |
||
69 | */ |
||
70 | 2 | public function signWithData($data) |
|
75 | |||
76 | /** |
||
77 | * Signature request |
||
78 | * |
||
79 | * @param string $urlString |
||
80 | * @param string $body |
||
81 | * @param string $contentType |
||
82 | * @param int $deadline |
||
83 | * @return string |
||
84 | */ |
||
85 | 2 | public function signRequest($urlString, $body, $contentType = null, $deadline = 0) |
|
106 | |||
107 | /** |
||
108 | * Split authorization signature |
||
109 | * |
||
110 | * @param string $authorization |
||
|
|||
111 | * @return list |
||
112 | */ |
||
113 | 2 | public function splitAuthorizationLarsign($authorizationLarsign) |
|
141 | |||
142 | /** |
||
143 | * Check auth signature |
||
144 | * |
||
145 | * @param \Illuminate\Http\Request $request |
||
146 | * @return bool |
||
147 | */ |
||
148 | 2 | public function check($request) |
|
174 | |||
175 | /** |
||
176 | * Verify callback |
||
177 | * |
||
178 | * @param string $contentType |
||
179 | * @param string $authorizationLarsign |
||
180 | * @param string $url |
||
181 | * @param string $body |
||
182 | * @param int $bodeadlinedy |
||
183 | * @return bool |
||
184 | */ |
||
185 | 2 | public function verifyCallback($contentType, $authorizationLarsign, $url, $body, $deadline) |
|
191 | |||
192 | /** |
||
193 | * Urlsafe base64 encode |
||
194 | * |
||
195 | * @param string $data |
||
196 | * |
||
197 | * @return string |
||
198 | */ |
||
199 | 2 | public function base64_urlSafeEncode($data) |
|
205 | |||
206 | /** |
||
207 | * Urlsafe base64 decode |
||
208 | * |
||
209 | * @param string $str |
||
210 | * |
||
211 | * @return string |
||
212 | */ |
||
213 | 2 | public function base64_urlSafeDecode($str) |
|
219 | } |
||
220 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.