@@ -70,7 +70,6 @@ discard block |
||
70 | 70 | * Transforms a date's string representation into $format |
71 | 71 | * |
72 | 72 | * @param string $format |
73 | - * @param string|int $datetime |
|
74 | 73 | * @return string/bool |
75 | 74 | */ |
76 | 75 | function _strtotime($date, $format = false) |
@@ -288,6 +287,10 @@ discard block |
||
288 | 287 | } |
289 | 288 | |
290 | 289 | if (!function_exists("money_format")) { |
290 | + |
|
291 | + /** |
|
292 | + * @param string $format |
|
293 | + */ |
|
291 | 294 | function money_format($format, $number) |
292 | 295 | { |
293 | 296 | $regex = '/%((?:[\^!\-]|\+|\(|\=.)*)([0-9]+)?' . |
@@ -124,11 +124,11 @@ discard block |
||
124 | 124 | |
125 | 125 | $unit = strtoupper(substr($post_max_size, -1)); |
126 | 126 | $multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1))); |
127 | - $post_max_size = ((int)$post_max_size) * $multiplier; |
|
127 | + $post_max_size = ((int) $post_max_size) * $multiplier; |
|
128 | 128 | |
129 | 129 | $unit = strtoupper(substr($upload_max_filesize, -1)); |
130 | 130 | $multiplier = ($unit == 'M' ? 1048576 : ($unit == 'K' ? 1024 : ($unit == 'G' ? 1073741824 : 1))); |
131 | - $upload_max_filesize = ((int)$upload_max_filesize) * $multiplier; |
|
131 | + $upload_max_filesize = ((int) $upload_max_filesize) * $multiplier; |
|
132 | 132 | |
133 | 133 | return round((min($post_max_size, $upload_max_filesize) / 1048576), 2) . 'MB'; |
134 | 134 | } |
@@ -233,8 +233,7 @@ discard block |
||
233 | 233 | } |
234 | 234 | /* Split digits and add. */ |
235 | 235 | $checksum += $current_num % 10; |
236 | - if |
|
237 | - ($current_num > 9 |
|
236 | + if ($current_num > 9 |
|
238 | 237 | ) { |
239 | 238 | $checksum += 1; |
240 | 239 | } |
@@ -308,9 +307,9 @@ discard block |
||
308 | 307 | 'nosimbol' => preg_match('/\!/', $fmatch[1]) > 0, |
309 | 308 | 'isleft' => preg_match('/\-/', $fmatch[1]) > 0, |
310 | 309 | ); |
311 | - $width = trim($fmatch[2]) ? (int)$fmatch[2] : 0; |
|
312 | - $left = trim($fmatch[3]) ? (int)$fmatch[3] : 0; |
|
313 | - $right = trim($fmatch[4]) ? (int)$fmatch[4] : $locale['int_frac_digits']; |
|
310 | + $width = trim($fmatch[2]) ? (int) $fmatch[2] : 0; |
|
311 | + $left = trim($fmatch[3]) ? (int) $fmatch[3] : 0; |
|
312 | + $right = trim($fmatch[4]) ? (int) $fmatch[4] : $locale['int_frac_digits']; |
|
314 | 313 | $conversion = $fmatch[5]; |
315 | 314 | |
316 | 315 | $positive = true; |
@@ -444,7 +443,7 @@ discard block |
||
444 | 443 | } |
445 | 444 | } #-> end of sub-call (array/object) |
446 | 445 | elseif ($waitfor && (strpos($waitfor, $c) !== false)) { |
447 | - return array($val, $n); // return current value and state |
|
446 | + return array($val, $n); // return current value and state |
|
448 | 447 | } #-= in-array |
449 | 448 | elseif ($state === ']') { |
450 | 449 | list($v, $n) = json_decode($json, 0, $n, 0, ",]"); |
@@ -454,7 +453,7 @@ discard block |
||
454 | 453 | } |
455 | 454 | } #-= in-object |
456 | 455 | elseif ($state === '}') { |
457 | - list($i, $n) = json_decode($json, 0, $n, 0, ":"); // this allowed non-string indicies |
|
456 | + list($i, $n) = json_decode($json, 0, $n, 0, ":"); // this allowed non-string indicies |
|
458 | 457 | list($v, $n) = json_decode($json, 0, $n + 1, 0, ",}"); |
459 | 458 | $val[$i] = $v; |
460 | 459 | if ($json[$n] == "}") { |
@@ -492,15 +491,15 @@ discard block |
||
492 | 491 | $val = $uu[1]; |
493 | 492 | $n += strlen($uu[0]) - 1; |
494 | 493 | if (strpos($val, ".")) { // float |
495 | - $val = (float)$val; |
|
494 | + $val = (float) $val; |
|
496 | 495 | } elseif ($val[0] == "0") { // oct |
497 | 496 | $val = octdec($val); |
498 | 497 | } else { |
499 | - $val = (int)$val; |
|
498 | + $val = (int) $val; |
|
500 | 499 | } |
501 | 500 | // exponent? |
502 | 501 | if (isset($uu[2])) { |
503 | - $val *= pow(10, (int)$uu[2]); |
|
502 | + $val *= pow(10, (int) $uu[2]); |
|
504 | 503 | } |
505 | 504 | } #-> boolean or null |
506 | 505 | elseif (preg_match("#^(true|false|null)\b#", substr($json, $n), $uu)) { |
@@ -19,7 +19,7 @@ |
||
19 | 19 | protected $defaultPlaceholder = "head"; |
20 | 20 | |
21 | 21 | /** |
22 | - * @param $file |
|
22 | + * @param string $file |
|
23 | 23 | * @param bool $placeholder |
24 | 24 | * @return $this |
25 | 25 | */ |
@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * @return mixed |
|
30 | + * @return string |
|
31 | 31 | */ |
32 | 32 | public function init() |
33 | 33 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Handle an incoming HTTP request. |
80 | 80 | * |
81 | - * @param SymfonyRequest|ServerRequestInterface $request |
|
81 | + * @param SymfonyRequest $request |
|
82 | 82 | * @param int $type |
83 | 83 | * @param bool $catch |
84 | 84 | * @return ResponseInterface |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | /** |
113 | 113 | * Handles a request to convert it to a response. |
114 | 114 | * |
115 | - * @param SymfonyRequest|ServerRequestInterface $request A Request instance |
|
115 | + * @param ServerRequestInterface $request A Request instance |
|
116 | 116 | * @param int $type The type of the request |
117 | 117 | * |
118 | 118 | * @return ResponseInterface A Response instance |
@@ -74,7 +74,7 @@ |
||
74 | 74 | * Checks if a header exists by the given case-insensitive name. |
75 | 75 | * |
76 | 76 | * @param string $name Case-insensitive header field name. |
77 | - * @return bool Returns true if any header names match the given header |
|
77 | + * @return boolean|null Returns true if any header names match the given header |
|
78 | 78 | * name using a case-insensitive string comparison. Returns false if |
79 | 79 | * no matching header name is found in the message. |
80 | 80 | */ |
@@ -57,7 +57,7 @@ |
||
57 | 57 | /** |
58 | 58 | * Return a new dispatcher containing the given element. |
59 | 59 | * |
60 | - * @param mixed $element |
|
60 | + * @param MiddlewareInterface $element |
|
61 | 61 | * @return DispatcherInterface |
62 | 62 | */ |
63 | 63 | public function withElement($element): DispatcherInterface |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | |
73 | 73 | /** |
74 | 74 | * @param $lang |
75 | - * @return mixed|string |
|
75 | + * @return string |
|
76 | 76 | */ |
77 | 77 | public function changeLangURL($lang) |
78 | 78 | { |
@@ -166,8 +166,8 @@ discard block |
||
166 | 166 | } |
167 | 167 | |
168 | 168 | /** |
169 | - * @param $lang |
|
170 | - * @return mixed|string |
|
169 | + * @param string $lang |
|
170 | + * @return string |
|
171 | 171 | */ |
172 | 172 | public function getLanguageCode($lang) |
173 | 173 | { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | |
181 | 181 | /** |
182 | 182 | * gets the default language to be used when translating |
183 | - * @return string $language |
|
183 | + * @return boolean $language |
|
184 | 184 | */ |
185 | 185 | public function getDefaultLanguage() |
186 | 186 | { |
@@ -241,7 +241,7 @@ discard block |
||
241 | 241 | * |
242 | 242 | * @param bool|string $slug |
243 | 243 | * @param bool|string $language |
244 | - * @return string |
|
244 | + * @return boolean |
|
245 | 245 | */ |
246 | 246 | public function hasTranslation($slug = false, $language = false) |
247 | 247 | { |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
165 | - * @param $directory |
|
165 | + * @param string $directory |
|
166 | 166 | */ |
167 | 167 | public function setCachePath($directory) |
168 | 168 | { |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | |
374 | 374 | /** |
375 | 375 | * @param $word |
376 | - * @return mixed |
|
376 | + * @return string |
|
377 | 377 | */ |
378 | 378 | protected function doCamelize($word) |
379 | 379 | { |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | |
383 | 383 | /** |
384 | 384 | * @param $word |
385 | - * @return mixed |
|
385 | + * @return string |
|
386 | 386 | */ |
387 | 387 | protected function doHyphenize($word) |
388 | 388 | { |
@@ -417,7 +417,7 @@ discard block |
||
417 | 417 | |
418 | 418 | /** |
419 | 419 | * @param $word |
420 | - * @return mixed |
|
420 | + * @return string |
|
421 | 421 | */ |
422 | 422 | public function pluralize($word) |
423 | 423 | { |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | /** |
46 | - * @param array $path |
|
46 | + * @param string[] $path |
|
47 | 47 | * @param bool $locale |
48 | 48 | * @return bool|mixed |
49 | 49 | */ |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * @param $locale |
|
93 | + * @param string $locale |
|
94 | 94 | */ |
95 | 95 | public function setCurrent($locale) |
96 | 96 | { |