@@ -36,6 +36,9 @@ discard block |
||
36 | 36 | private $caughtLength; |
37 | 37 | private $fileLinkFormat; |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $fileLinkFormat |
|
41 | + */ |
|
39 | 42 | public function __construct(bool $debug = true, string $charset = null, $fileLinkFormat = null) |
40 | 43 | { |
41 | 44 | $this->debug = $debug; |
@@ -342,6 +345,10 @@ discard block |
||
342 | 345 | EOF; |
343 | 346 | } |
344 | 347 | |
348 | + /** |
|
349 | + * @param string $content |
|
350 | + * @param string $css |
|
351 | + */ |
|
345 | 352 | private function decorate($content, $css) |
346 | 353 | { |
347 | 354 | return <<<EOF |
@@ -120,6 +120,10 @@ |
||
120 | 120 | } |
121 | 121 | |
122 | 122 | // dummy function to test trace in error handler. |
123 | + |
|
124 | + /** |
|
125 | + * @param ErrorHandlerTest $that |
|
126 | + */ |
|
123 | 127 | private static function triggerNotice($that) |
124 | 128 | { |
125 | 129 | $that->assertSame('', $foo.$foo.$bar); |
@@ -558,7 +558,7 @@ |
||
558 | 558 | * |
559 | 559 | * This method implements the IteratorAggregate interface. |
560 | 560 | * |
561 | - * @return \Iterator|SplFileInfo[] An iterator |
|
561 | + * @return \Traversable An iterator |
|
562 | 562 | * |
563 | 563 | * @throws \LogicException if the in() method has not been called |
564 | 564 | */ |
@@ -64,7 +64,7 @@ |
||
64 | 64 | /** |
65 | 65 | * Same as IteratorTestCase::assertIterator with foreach usage. |
66 | 66 | * |
67 | - * @param array $expected |
|
67 | + * @param string[] $expected |
|
68 | 68 | * @param \Traversable $iterator |
69 | 69 | */ |
70 | 70 | protected function assertIteratorInForeach($expected, \Traversable $iterator) |
@@ -16,26 +16,67 @@ discard block |
||
16 | 16 | define('MB_CASE_LOWER', 1); |
17 | 17 | define('MB_CASE_TITLE', 2); |
18 | 18 | |
19 | + /** |
|
20 | + * @return string |
|
21 | + */ |
|
19 | 22 | function mb_convert_encoding($s, $to, $from = null) { return p\Mbstring::mb_convert_encoding($s, $to, $from); } |
20 | 23 | function mb_decode_mimeheader($s) { return p\Mbstring::mb_decode_mimeheader($s); } |
24 | + |
|
25 | + /** |
|
26 | + * @param string $s |
|
27 | + * @param string $charset |
|
28 | + * @param string $transferEnc |
|
29 | + * @param string $lf |
|
30 | + */ |
|
21 | 31 | 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 | 32 | function mb_decode_numericentity($s, $convmap, $enc = null) { return p\Mbstring::mb_decode_numericentity($s, $convmap, $enc); } |
23 | 33 | function mb_encode_numericentity($s, $convmap, $enc = null, $is_hex = false) { return p\Mbstring::mb_encode_numericentity($s, $convmap, $enc, $is_hex); } |
34 | + |
|
35 | + /** |
|
36 | + * @param integer $mode |
|
37 | + * @param string $enc |
|
38 | + */ |
|
24 | 39 | function mb_convert_case($s, $mode, $enc = null) { return p\Mbstring::mb_convert_case($s, $mode, $enc); } |
25 | 40 | function mb_internal_encoding($enc = null) { return p\Mbstring::mb_internal_encoding($enc); } |
41 | + |
|
42 | + /** |
|
43 | + * @param string $lang |
|
44 | + */ |
|
26 | 45 | function mb_language($lang = null) { return p\Mbstring::mb_language($lang); } |
27 | 46 | function mb_list_encodings() { return p\Mbstring::mb_list_encodings(); } |
28 | 47 | function mb_encoding_aliases($encoding) { return p\Mbstring::mb_encoding_aliases($encoding); } |
48 | + |
|
49 | + /** |
|
50 | + * @param string $var |
|
51 | + * @param string $encoding |
|
52 | + */ |
|
29 | 53 | function mb_check_encoding($var = null, $encoding = null) { return p\Mbstring::mb_check_encoding($var, $encoding); } |
30 | 54 | function mb_detect_encoding($str, $encodingList = null, $strict = false) { return p\Mbstring::mb_detect_encoding($str, $encodingList, $strict); } |
31 | 55 | function mb_detect_order($encodingList = null) { return p\Mbstring::mb_detect_order($encodingList); } |
32 | 56 | function mb_parse_str($s, &$result = array()) { parse_str($s, $result); } |
57 | + |
|
58 | + /** |
|
59 | + * @return string |
|
60 | + */ |
|
33 | 61 | function mb_strlen($s, $enc = null) { return p\Mbstring::mb_strlen($s, $enc); } |
34 | 62 | function mb_strpos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_strpos($s, $needle, $offset, $enc); } |
63 | + |
|
64 | + /** |
|
65 | + * @param string $enc |
|
66 | + */ |
|
35 | 67 | function mb_strtolower($s, $enc = null) { return p\Mbstring::mb_strtolower($s, $enc); } |
68 | + |
|
69 | + /** |
|
70 | + * @param string $enc |
|
71 | + */ |
|
36 | 72 | function mb_strtoupper($s, $enc = null) { return p\Mbstring::mb_strtoupper($s, $enc); } |
37 | 73 | function mb_substitute_character($char = null) { return p\Mbstring::mb_substitute_character($char); } |
38 | 74 | function mb_substr($s, $start, $length = 2147483647, $enc = null) { return p\Mbstring::mb_substr($s, $start, $length, $enc); } |
75 | + |
|
76 | + /** |
|
77 | + * @param string $s |
|
78 | + * @param string $needle |
|
79 | + */ |
|
39 | 80 | function mb_stripos($s, $needle, $offset = 0, $enc = null) { return p\Mbstring::mb_stripos($s, $needle, $offset, $enc); } |
40 | 81 | function mb_stristr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_stristr($s, $needle, $part, $enc); } |
41 | 82 | function mb_strrchr($s, $needle, $part = false, $enc = null) { return p\Mbstring::mb_strrchr($s, $needle, $part, $enc); } |
@@ -49,6 +90,10 @@ discard block |
||
49 | 90 | function mb_substr_count($haystack, $needle, $enc = null) { return p\Mbstring::mb_substr_count($haystack, $needle, $enc); } |
50 | 91 | function mb_output_handler($contents, $status) { return p\Mbstring::mb_output_handler($contents, $status); } |
51 | 92 | function mb_http_input($type = '') { return p\Mbstring::mb_http_input($type); } |
93 | + |
|
94 | + /** |
|
95 | + * @param string $fromEncoding |
|
96 | + */ |
|
52 | 97 | function mb_convert_variables($toEncoding, $fromEncoding, &$a = null, &$b = null, &$c = null, &$d = null, &$e = null, &$f = null) { return p\Mbstring::mb_convert_variables($toEncoding, $fromEncoding, $a, $b, $c, $d, $e, $f); } |
53 | 98 | } |
54 | 99 | if (!function_exists('mb_chr')) { |
@@ -408,6 +408,9 @@ discard block |
||
408 | 408 | return self::mb_detect_encoding($var, array($encoding)) || false !== @iconv($encoding, $encoding, $var); |
409 | 409 | } |
410 | 410 | |
411 | + /** |
|
412 | + * @return string |
|
413 | + */ |
|
411 | 414 | public static function mb_detect_encoding($str, $encodingList = null, $strict = false) |
412 | 415 | { |
413 | 416 | if (null === $encodingList) { |
@@ -729,6 +732,9 @@ discard block |
||
729 | 732 | return $code; |
730 | 733 | } |
731 | 734 | |
735 | + /** |
|
736 | + * @param boolean $part |
|
737 | + */ |
|
732 | 738 | private static function getSubpart($pos, $part, $haystack, $encoding) |
733 | 739 | { |
734 | 740 | if (false === $pos) { |
@@ -771,6 +777,9 @@ discard block |
||
771 | 777 | return self::mb_convert_case($s[1], MB_CASE_UPPER, 'UTF-8').self::mb_convert_case($s[2], MB_CASE_LOWER, 'UTF-8'); |
772 | 778 | } |
773 | 779 | |
780 | + /** |
|
781 | + * @param string $file |
|
782 | + */ |
|
774 | 783 | private static function getData($file) |
775 | 784 | { |
776 | 785 | if (file_exists($file = __DIR__.'/Resources/unidata/'.$file.'.php')) { |
@@ -100,6 +100,9 @@ |
||
100 | 100 | return $this->display($io, $filesInfo); |
101 | 101 | } |
102 | 102 | |
103 | + /** |
|
104 | + * @param string $content |
|
105 | + */ |
|
103 | 106 | private function validate($content, $file = null) |
104 | 107 | { |
105 | 108 | $errors = array(); |
@@ -26,6 +26,7 @@ |
||
26 | 26 | * |
27 | 27 | * @param MessageCatalogue $messages The message catalogue |
28 | 28 | * @param array $options Options that are used by the dumper |
29 | + * @return void |
|
29 | 30 | */ |
30 | 31 | public function dump(MessageCatalogue $messages, $options = array()); |
31 | 32 | } |
@@ -55,6 +55,9 @@ discard block |
||
55 | 55 | return 'xlf'; |
56 | 56 | } |
57 | 57 | |
58 | + /** |
|
59 | + * @param string $domain |
|
60 | + */ |
|
58 | 61 | private function dumpXliff1($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) |
59 | 62 | { |
60 | 63 | $toolInfo = array('tool-id' => 'symfony', 'tool-name' => 'Symfony'); |
@@ -129,6 +132,9 @@ discard block |
||
129 | 132 | return $dom->saveXML(); |
130 | 133 | } |
131 | 134 | |
135 | + /** |
|
136 | + * @param string $domain |
|
137 | + */ |
|
132 | 138 | private function dumpXliff2($defaultLocale, MessageCatalogue $messages, $domain, array $options = array()) |
133 | 139 | { |
134 | 140 | $dom = new \DOMDocument('1.0', 'utf-8'); |