@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | /** |
14 | 14 | * Register an updated model event with the dispatcher. |
15 | 15 | * |
16 | - * @param \Closure|string $callback |
|
16 | + * @param Closure $callback |
|
17 | 17 | * |
18 | 18 | * @return void |
19 | 19 | */ |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | /** |
23 | 23 | * Register a created model event with the dispatcher. |
24 | 24 | * |
25 | - * @param \Closure|string $callback |
|
25 | + * @param Closure $callback |
|
26 | 26 | * |
27 | 27 | * @return void |
28 | 28 | */ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Register a deleted model event with the dispatcher. |
33 | 33 | * |
34 | - * @param \Closure|string $callback |
|
34 | + * @param Closure $callback |
|
35 | 35 | * |
36 | 36 | * @return void |
37 | 37 | */ |
@@ -57,6 +57,9 @@ discard block |
||
57 | 57 | return $this; |
58 | 58 | } |
59 | 59 | |
60 | + /** |
|
61 | + * @param string $errorMessage |
|
62 | + */ |
|
60 | 63 | public function setError($errorMessage, $code = 0) |
61 | 64 | { |
62 | 65 | $this->error = $errorMessage; |
@@ -79,6 +82,7 @@ discard block |
||
79 | 82 | |
80 | 83 | /** |
81 | 84 | * Recupera dados em cima de um get de uma api |
85 | + * @param string $path |
|
82 | 86 | */ |
83 | 87 | public function get($path) |
84 | 88 | { |
@@ -52,7 +52,7 @@ |
||
52 | 52 | /** |
53 | 53 | * Parses the API Reply |
54 | 54 | * |
55 | - * @param mixed $jsonreply |
|
55 | + * @param string $jsonreply |
|
56 | 56 | * |
57 | 57 | * @return mixed |
58 | 58 | */ |
@@ -201,6 +201,12 @@ discard block |
||
201 | 201 | // (1) do a lookup in a table of trusted certs keyed off of consumer |
202 | 202 | // |
203 | 203 | // Either way should return a string representation of the certificate |
204 | + |
|
205 | + /** |
|
206 | + * @param OAuthRequest $request |
|
207 | + * |
|
208 | + * @return string |
|
209 | + */ |
|
204 | 210 | protected abstract function fetch_private_cert(&$request); |
205 | 211 | |
206 | 212 | public function build_signature($request, $consumer, $token) |
@@ -338,6 +344,9 @@ discard block |
||
338 | 344 | return new OAuthRequest($http_method, $http_url, $parameters); |
339 | 345 | } |
340 | 346 | |
347 | + /** |
|
348 | + * @param string $name |
|
349 | + */ |
|
341 | 350 | public function set_parameter($name, $value, $allow_duplicates = true) |
342 | 351 | { |
343 | 352 | if ($allow_duplicates && isset($this->parameters[$name])) { |
@@ -119,6 +119,8 @@ discard block |
||
119 | 119 | * @param string consumer secret |
120 | 120 | * @param string access token |
121 | 121 | * @param string access token secret |
122 | + * @param string $consumer_key |
|
123 | + * @param string $consumer_secret |
|
122 | 124 | * @return TwitterApiClient |
123 | 125 | */ |
124 | 126 | public function set_oauth( $consumer_key, $consumer_secret, $access_key = '', $access_secret = '' ) |
@@ -225,6 +227,7 @@ discard block |
||
225 | 227 | * @param string API method, e.g. "users/show" |
226 | 228 | * @param array method arguments |
227 | 229 | * @param string http request method |
230 | + * @param string $path |
|
228 | 231 | * @return array unserialized data returned from Twitter |
229 | 232 | * @throws TwitterApiException |
230 | 233 | */ |
@@ -290,6 +293,7 @@ discard block |
||
290 | 293 | * Perform an OAuth request - these differ somewhat from regular API calls |
291 | 294 | * |
292 | 295 | * @internal |
296 | + * @param string $endpoint |
|
293 | 297 | */ |
294 | 298 | private function oauth_exchange( $endpoint, array $args ) |
295 | 299 | { |
@@ -327,6 +331,7 @@ discard block |
||
327 | 331 | /** |
328 | 332 | * Sign and execute REST API call |
329 | 333 | * |
334 | + * @param string $http_method |
|
330 | 335 | * @return array |
331 | 336 | */ |
332 | 337 | private function rest_request( $path, array $args, $http_method ) |
@@ -669,6 +674,7 @@ discard block |
||
669 | 674 | * Construct TwitterApiException with addition of HTTP status code. |
670 | 675 | * |
671 | 676 | * @overload |
677 | + * @param string $message |
|
672 | 678 | */ |
673 | 679 | public function __construct( $message, $code = 0 ) |
674 | 680 | { |
@@ -199,6 +199,7 @@ discard block |
||
199 | 199 | |
200 | 200 | /** |
201 | 201 | * Format and sign an OAuth / API request |
202 | + * @param string $method |
|
202 | 203 | */ |
203 | 204 | function oAuthRequest($url, $method, $parameters) |
204 | 205 | { |
@@ -218,6 +219,7 @@ discard block |
||
218 | 219 | /** |
219 | 220 | * Make an HTTP request |
220 | 221 | * |
222 | + * @param string $postfields |
|
221 | 223 | * @return API results |
222 | 224 | */ |
223 | 225 | function http($url, $method, $postfields = null) |
@@ -174,6 +174,10 @@ discard block |
||
174 | 174 | } |
175 | 175 | return $links; |
176 | 176 | } |
177 | + |
|
178 | + /** |
|
179 | + * @param string $found_link |
|
180 | + */ |
|
177 | 181 | private function bad_link_check($found_link) |
178 | 182 | { |
179 | 183 | $bad = [':', 'http', '\\', '<', '#']; |
@@ -187,6 +191,10 @@ discard block |
||
187 | 191 | } |
188 | 192 | return $is_bad; |
189 | 193 | } |
194 | + |
|
195 | + /** |
|
196 | + * @return string |
|
197 | + */ |
|
190 | 198 | private function fix_link($link) |
191 | 199 | { |
192 | 200 | if(strpos($link, "|") !== false) { |
@@ -222,6 +230,10 @@ discard block |
||
222 | 230 | } |
223 | 231 | return $quotes; |
224 | 232 | } |
233 | + |
|
234 | + /** |
|
235 | + * @param string $url |
|
236 | + */ |
|
225 | 237 | private function get_redirect_url($url) |
226 | 238 | { |
227 | 239 | $r = array('http' => array('method' => 'HEAD')); |
@@ -309,6 +321,10 @@ discard block |
||
309 | 321 | } |
310 | 322 | return $article; |
311 | 323 | } |
324 | + |
|
325 | + /** |
|
326 | + * @param string $notice |
|
327 | + */ |
|
312 | 328 | private function show_error($notice) |
313 | 329 | { |
314 | 330 | echo json_encode([$notice]); |
@@ -45,6 +45,10 @@ |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | // Helper Function to get the Content from the API URL |
48 | + |
|
49 | + /** |
|
50 | + * @param string $url |
|
51 | + */ |
|
48 | 52 | private function getContent($url, $user_agent, $proxy='') |
49 | 53 | { |
50 | 54 |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | /** |
76 | 76 | * Get the details of a user from LDAP using the given username. |
77 | 77 | * User found via configurable user filter. |
78 | - * @param $userName |
|
78 | + * @param string $userName |
|
79 | 79 | * @return array|null |
80 | 80 | * @throws LdapException |
81 | 81 | */ |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | /** |
148 | 148 | * Bind the system user to the LDAP connection using the given credentials |
149 | 149 | * otherwise anonymous access is attempted. |
150 | - * @param $connection |
|
150 | + * @param resource $connection |
|
151 | 151 | * @throws LdapException |
152 | 152 | */ |
153 | 153 | protected function bindSystemUser($connection) |