@@ -202,7 +202,7 @@ |
||
202 | 202 | * We don't have any more options, so let's throw an exception right now |
203 | 203 | * and hope the developer won't let it fail silently. |
204 | 204 | * |
205 | - * @param mixed $length |
|
205 | + * @param integer $length |
|
206 | 206 | * @psalm-suppress MissingReturnType |
207 | 207 | * @throws Exception |
208 | 208 | * @return string |
@@ -20,30 +20,69 @@ |
||
20 | 20 | function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } |
21 | 21 | function mb_encode_mimeheader($s, $charset = null, $transferEnc = null, $lf = null, $indent = null) { return p\Mbstring::mb_encode_mimeheader($s, $charset, $transferEnc, $lf, $indent); } |
22 | 22 | function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } |
23 | + |
|
24 | + /** |
|
25 | + * @param string $s |
|
26 | + * @param integer[] $convmap |
|
27 | + */ |
|
23 | 28 | function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } |
24 | 29 | function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } |
30 | + |
|
31 | + /** |
|
32 | + * @param string|boolean $enc |
|
33 | + */ |
|
25 | 34 | function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } |
26 | 35 | function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } |
27 | 36 | function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } |
28 | 37 | function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } |
38 | + |
|
39 | + /** |
|
40 | + * @param string $var |
|
41 | + * @param string $encoding |
|
42 | + */ |
|
29 | 43 | function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } |
30 | 44 | function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } |
31 | 45 | function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } |
32 | 46 | function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } |
33 | 47 | function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } |
48 | + |
|
49 | + /** |
|
50 | + * @param string $s |
|
51 | + * @param string $needle |
|
52 | + * @param string $enc |
|
53 | + */ |
|
34 | 54 | function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } |
55 | + |
|
56 | + /** |
|
57 | + * @param string $s |
|
58 | + * @param string $enc |
|
59 | + */ |
|
35 | 60 | function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } |
36 | 61 | function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } |
37 | 62 | function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } |
38 | 63 | function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } |
64 | + |
|
65 | + /** |
|
66 | + * @param string $enc |
|
67 | + */ |
|
39 | 68 | function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } |
40 | 69 | function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } |
41 | 70 | function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } |
42 | 71 | function mb_strrichr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrichr($s, $needle, $part, $enc); } |
43 | 72 | function mb_strripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strripos($s, $needle, $offset, $enc); } |
73 | + |
|
74 | + /** |
|
75 | + * @param string $s |
|
76 | + * @param string $needle |
|
77 | + * @param string $enc |
|
78 | + */ |
|
44 | 79 | function mb_strrpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strrpos($s, $needle, $offset, $enc); } |
45 | 80 | function mb_strstr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strstr($s, $needle, $part, $enc); } |
46 | 81 | function mb_get_info($type = 'all') { return p\Mbstring::mb_get_info($type); } |
82 | + |
|
83 | + /** |
|
84 | + * @param string $enc |
|
85 | + */ |
|
47 | 86 | function mb_http_output($enc = null) { return p\Mbstring::mb_http_output($enc); } |
48 | 87 | function mb_strwidth($s, $enc = null) { return p\Mbstring::mb_strwidth($s, $enc); } |
49 | 88 | function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } |
@@ -444,6 +444,9 @@ discard block |
||
444 | 444 | } |
445 | 445 | } |
446 | 446 | |
447 | + /** |
|
448 | + * @param integer $value |
|
449 | + */ |
|
447 | 450 | public static function eq($value, $value2, $message = '') |
448 | 451 | { |
449 | 452 | if ($value2 != $value) { |
@@ -455,6 +458,9 @@ discard block |
||
455 | 458 | } |
456 | 459 | } |
457 | 460 | |
461 | + /** |
|
462 | + * @param string $value2 |
|
463 | + */ |
|
458 | 464 | public static function notEq($value, $value2, $message = '') |
459 | 465 | { |
460 | 466 | if ($value2 == $value) { |
@@ -1076,6 +1082,9 @@ discard block |
||
1076 | 1082 | return mb_strwidth($value, $encoding); |
1077 | 1083 | } |
1078 | 1084 | |
1085 | + /** |
|
1086 | + * @param string $message |
|
1087 | + */ |
|
1079 | 1088 | protected static function reportInvalidArgument($message) |
1080 | 1089 | { |
1081 | 1090 | throw new InvalidArgumentException($message); |
@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace Xmf\Jwt; |
13 | 13 | |
14 | 14 | use Xmf\Key\KeyAbstract; |
15 | -use Xmf\Key\StorageInterface; |
|
16 | 15 | |
17 | 16 | /** |
18 | 17 | * Build a token |
@@ -48,7 +48,7 @@ |
||
48 | 48 | /** |
49 | 49 | * Validate and decode a JSON Web Token string from a cookie |
50 | 50 | * |
51 | - * @param KeyAbstract|string $key the key to use to sign the token, or name of key to build |
|
51 | + * @param string $key the key to use to sign the token, or name of key to build |
|
52 | 52 | * @param string $cookieName name of cookie that sources the token |
53 | 53 | * @param array|\Traversable $assertClaims traversable set of claims, claim => value, to assert |
54 | 54 | * |