@@ -132,6 +132,9 @@ discard block |
||
| 132 | 132 | $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\'s your name?')); |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | + /** |
|
| 136 | + * @param string $input |
|
| 137 | + */ |
|
| 135 | 138 | protected function getInputStream($input) |
| 136 | 139 | { |
| 137 | 140 | $stream = fopen('php://memory', 'r+', false); |
@@ -159,6 +162,9 @@ discard block |
||
| 159 | 162 | return $mock; |
| 160 | 163 | } |
| 161 | 164 | |
| 165 | + /** |
|
| 166 | + * @param string $expected |
|
| 167 | + */ |
|
| 162 | 168 | private function assertOutputContains($expected, StreamOutput $output) |
| 163 | 169 | { |
| 164 | 170 | rewind($output->getStream()); |
@@ -205,6 +205,9 @@ discard block |
||
| 205 | 205 | } |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | + /** |
|
| 209 | + * @param string $class |
|
| 210 | + */ |
|
| 208 | 211 | public function checkAnnotations(\ReflectionClass $refl, $class) |
| 209 | 212 | { |
| 210 | 213 | $deprecations = array(); |
@@ -340,6 +343,7 @@ discard block |
||
| 340 | 343 | |
| 341 | 344 | /** |
| 342 | 345 | * `realpath` on MacOSX doesn't normalize the case of characters. |
| 346 | + * @param string $real |
|
| 343 | 347 | */ |
| 344 | 348 | private function darwinRealpath($real) |
| 345 | 349 | { |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | /** |
| 105 | 105 | * Registers the error handler. |
| 106 | 106 | * |
| 107 | - * @param self|null $handler The handler to register |
|
| 107 | + * @param null|\self $handler The handler to register |
|
| 108 | 108 | * @param bool $replace Whether to replace or not any existing handler |
| 109 | 109 | * |
| 110 | 110 | * @return self The registered error handler |
@@ -345,6 +345,7 @@ discard block |
||
| 345 | 345 | |
| 346 | 346 | /** |
| 347 | 347 | * Re-registers as a PHP error handler if levels changed. |
| 348 | + * @param integer $prev |
|
| 348 | 349 | */ |
| 349 | 350 | private function reRegister($prev) |
| 350 | 351 | { |
@@ -371,7 +372,7 @@ discard block |
||
| 371 | 372 | * @param string $file |
| 372 | 373 | * @param int $line |
| 373 | 374 | * |
| 374 | - * @return bool Returns false when no handling happens so that the PHP engine can handle the error itself |
|
| 375 | + * @return boolean|null Returns false when no handling happens so that the PHP engine can handle the error itself |
|
| 375 | 376 | * |
| 376 | 377 | * @throws \ErrorException When $this->thrownErrors requests so |
| 377 | 378 | * |
@@ -661,6 +662,11 @@ discard block |
||
| 661 | 662 | ); |
| 662 | 663 | } |
| 663 | 664 | |
| 665 | + /** |
|
| 666 | + * @param integer $type |
|
| 667 | + * @param string $file |
|
| 668 | + * @param integer $line |
|
| 669 | + */ |
|
| 664 | 670 | private function cleanTrace($backtrace, $type, $file, $line, $throw) |
| 665 | 671 | { |
| 666 | 672 | $lightTrace = $backtrace; |
@@ -33,6 +33,9 @@ discard block |
||
| 33 | 33 | private $file; |
| 34 | 34 | private $line; |
| 35 | 35 | |
| 36 | + /** |
|
| 37 | + * @param integer $statusCode |
|
| 38 | + */ |
|
| 36 | 39 | public static function create(\Exception $exception, $statusCode = null, array $headers = array()) |
| 37 | 40 | { |
| 38 | 41 | return static::createFromThrowable($exception, $statusCode, $headers); |
@@ -110,6 +113,9 @@ discard block |
||
| 110 | 113 | return $this->class; |
| 111 | 114 | } |
| 112 | 115 | |
| 116 | + /** |
|
| 117 | + * @param string $class |
|
| 118 | + */ |
|
| 113 | 119 | public function setClass($class) |
| 114 | 120 | { |
| 115 | 121 | $this->class = $class; |
@@ -140,6 +146,9 @@ discard block |
||
| 140 | 146 | return $this->message; |
| 141 | 147 | } |
| 142 | 148 | |
| 149 | + /** |
|
| 150 | + * @param string $message |
|
| 151 | + */ |
|
| 143 | 152 | public function setMessage($message) |
| 144 | 153 | { |
| 145 | 154 | $this->message = $message; |
@@ -150,6 +159,9 @@ discard block |
||
| 150 | 159 | return $this->code; |
| 151 | 160 | } |
| 152 | 161 | |
| 162 | + /** |
|
| 163 | + * @param integer $code |
|
| 164 | + */ |
|
| 153 | 165 | public function setCode($code) |
| 154 | 166 | { |
| 155 | 167 | $this->code = $code; |
@@ -196,6 +208,10 @@ discard block |
||
| 196 | 208 | $this->setTrace($throwable->getTrace(), $throwable->getFile(), $throwable->getLine()); |
| 197 | 209 | } |
| 198 | 210 | |
| 211 | + /** |
|
| 212 | + * @param string $file |
|
| 213 | + * @param integer $line |
|
| 214 | + */ |
|
| 199 | 215 | public function setTrace($trace, $file, $line) |
| 200 | 216 | { |
| 201 | 217 | $this->trace = array(); |
@@ -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')) { |