@@ -241,6 +241,7 @@ |
||
241 | 241 | |
242 | 242 | /** |
243 | 243 | * {@inheritdoc} |
244 | + * @param string $path |
|
244 | 245 | */ |
245 | 246 | public function applyPathPrefix($path): string |
246 | 247 | { |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | /** |
116 | 116 | * Registers the error handler. |
117 | 117 | * |
118 | - * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels |
|
118 | + * @param ErrorHandler $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels |
|
119 | 119 | * @param bool $replace Whether to replace or not any existing handler |
120 | 120 | * |
121 | 121 | * @return self The registered error handler |
@@ -355,6 +355,7 @@ discard block |
||
355 | 355 | |
356 | 356 | /** |
357 | 357 | * Re-registers as a PHP error handler if levels changed. |
358 | + * @param integer $prev |
|
358 | 359 | */ |
359 | 360 | private function reRegister($prev) |
360 | 361 | { |
@@ -145,6 +145,9 @@ discard block |
||
145 | 145 | return $this->class; |
146 | 146 | } |
147 | 147 | |
148 | + /** |
|
149 | + * @param string $class |
|
150 | + */ |
|
148 | 151 | public function setClass($class) |
149 | 152 | { |
150 | 153 | $this->class = $class; |
@@ -155,6 +158,9 @@ discard block |
||
155 | 158 | return $this->file; |
156 | 159 | } |
157 | 160 | |
161 | + /** |
|
162 | + * @param string $file |
|
163 | + */ |
|
158 | 164 | public function setFile($file) |
159 | 165 | { |
160 | 166 | $this->file = $file; |
@@ -165,6 +171,9 @@ discard block |
||
165 | 171 | return $this->line; |
166 | 172 | } |
167 | 173 | |
174 | + /** |
|
175 | + * @param integer $line |
|
176 | + */ |
|
168 | 177 | public function setLine($line) |
169 | 178 | { |
170 | 179 | $this->line = $line; |
@@ -175,6 +184,9 @@ discard block |
||
175 | 184 | return $this->message; |
176 | 185 | } |
177 | 186 | |
187 | + /** |
|
188 | + * @param string $message |
|
189 | + */ |
|
178 | 190 | public function setMessage($message) |
179 | 191 | { |
180 | 192 | $this->message = $message; |
@@ -221,6 +233,10 @@ discard block |
||
221 | 233 | $this->setTrace($exception->getTrace(), $exception->getFile(), $exception->getLine()); |
222 | 234 | } |
223 | 235 | |
236 | + /** |
|
237 | + * @param string $file |
|
238 | + * @param integer $line |
|
239 | + */ |
|
224 | 240 | public function setTrace($trace, $file, $line) |
225 | 241 | { |
226 | 242 | $this->trace = array(); |
@@ -36,6 +36,10 @@ discard block |
||
36 | 36 | private $caughtLength; |
37 | 37 | private $fileLinkFormat; |
38 | 38 | |
39 | + /** |
|
40 | + * @param string $charset |
|
41 | + * @param string $fileLinkFormat |
|
42 | + */ |
|
39 | 43 | public function __construct($debug = true, $charset = null, $fileLinkFormat = null) |
40 | 44 | { |
41 | 45 | if (false !== strpos($charset, '%')) { |
@@ -180,7 +184,7 @@ discard block |
||
180 | 184 | * This method uses plain PHP functions like header() and echo to output |
181 | 185 | * the response. |
182 | 186 | * |
183 | - * @param \Exception|FlattenException $exception An \Exception or FlattenException instance |
|
187 | + * @param \Exception $exception An \Exception or FlattenException instance |
|
184 | 188 | */ |
185 | 189 | public function sendPhpResponse($exception) |
186 | 190 | { |
@@ -202,7 +206,7 @@ discard block |
||
202 | 206 | /** |
203 | 207 | * Creates the error Response associated with the given Exception. |
204 | 208 | * |
205 | - * @param \Exception|FlattenException $exception An \Exception or FlattenException instance |
|
209 | + * @param \Exception $exception An \Exception or FlattenException instance |
|
206 | 210 | * |
207 | 211 | * @return Response A Response instance |
208 | 212 | * |
@@ -222,7 +226,7 @@ discard block |
||
222 | 226 | /** |
223 | 227 | * Gets the full HTML content associated with the given exception. |
224 | 228 | * |
225 | - * @param \Exception|FlattenException $exception An \Exception or FlattenException instance |
|
229 | + * @param FlattenException $exception An \Exception or FlattenException instance |
|
226 | 230 | * |
227 | 231 | * @return string The HTML content as a string |
228 | 232 | */ |
@@ -369,6 +373,10 @@ discard block |
||
369 | 373 | EOF; |
370 | 374 | } |
371 | 375 | |
376 | + /** |
|
377 | + * @param string $content |
|
378 | + * @param string $css |
|
379 | + */ |
|
372 | 380 | private function decorate($content, $css) |
373 | 381 | { |
374 | 382 | return <<<EOF |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * |
32 | 32 | * @param string $name The name of the cookie |
33 | 33 | * @param string $value The value of the cookie |
34 | - * @param int|string|\DateTime|\DateTimeInterface $expire The time the cookie expires |
|
34 | + * @param integer $expire The time the cookie expires |
|
35 | 35 | * @param string $path The path on the server in which the cookie will be available on |
36 | 36 | * @param string $domain The domain that the cookie is available to |
37 | 37 | * @param bool $secure Whether the cookie should only be transmitted over a secure HTTPS connection from the client |
@@ -103,6 +103,10 @@ |
||
103 | 103 | return $target; |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $directory |
|
108 | + * @param string $name |
|
109 | + */ |
|
106 | 110 | protected function getTargetFile($directory, $name = null) |
107 | 111 | { |
108 | 112 | if (!is_dir($directory)) { |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | * Returns a header value by name. |
105 | 105 | * |
106 | 106 | * @param string $key The header name |
107 | - * @param mixed $default The default value |
|
107 | + * @param string|null $default The default value |
|
108 | 108 | * @param bool $first Whether to return the first value or all header values |
109 | 109 | * |
110 | 110 | * @return string|array The first header value if $first is true, an array of values otherwise |
@@ -220,7 +220,7 @@ discard block |
||
220 | 220 | * Adds a custom Cache-Control directive. |
221 | 221 | * |
222 | 222 | * @param string $key The Cache-Control directive name |
223 | - * @param mixed $value The Cache-Control directive value |
|
223 | + * @param integer $value The Cache-Control directive value |
|
224 | 224 | */ |
225 | 225 | public function addCacheControlDirective($key, $value = true) |
226 | 226 | { |
@@ -31,7 +31,7 @@ |
||
31 | 31 | * Checks if an IPv4 or IPv6 address is contained in the list of given IPs or subnets. |
32 | 32 | * |
33 | 33 | * @param string $requestIp IP to check |
34 | - * @param string|array $ips List of IPs or subnets (can be a string if only a single one) |
|
34 | + * @param string[] $ips List of IPs or subnets (can be a string if only a single one) |
|
35 | 35 | * |
36 | 36 | * @return bool Whether the IP is valid |
37 | 37 | */ |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | * |
545 | 545 | * You should only list the reverse proxies that you manage directly. |
546 | 546 | * |
547 | - * @param array $proxies A list of trusted proxies |
|
547 | + * @param string[] $proxies A list of trusted proxies |
|
548 | 548 | */ |
549 | 549 | public static function setTrustedProxies(array $proxies) |
550 | 550 | { |
@@ -554,7 +554,7 @@ discard block |
||
554 | 554 | /** |
555 | 555 | * Gets the list of trusted proxies. |
556 | 556 | * |
557 | - * @return array An array of trusted proxies |
|
557 | + * @return string[] An array of trusted proxies |
|
558 | 558 | */ |
559 | 559 | public static function getTrustedProxies() |
560 | 560 | { |
@@ -580,7 +580,7 @@ discard block |
||
580 | 580 | /** |
581 | 581 | * Gets the list of trusted host patterns. |
582 | 582 | * |
583 | - * @return array An array of trusted host patterns |
|
583 | + * @return string[] An array of trusted host patterns |
|
584 | 584 | */ |
585 | 585 | public static function getTrustedHosts() |
586 | 586 | { |
@@ -1469,7 +1469,6 @@ discard block |
||
1469 | 1469 | * |
1470 | 1470 | * @see https://tools.ietf.org/html/rfc7231#section-4.2.1 |
1471 | 1471 | * |
1472 | - * @param bool $andCacheable Adds the additional condition that the method should be cacheable. True by default. |
|
1473 | 1472 | * |
1474 | 1473 | * @return bool |
1475 | 1474 | */ |
@@ -1495,7 +1494,7 @@ discard block |
||
1495 | 1494 | * |
1496 | 1495 | * @param bool $asResource If true, a resource will be returned |
1497 | 1496 | * |
1498 | - * @return string|resource The request body content or a resource to read the body stream |
|
1497 | + * @return string The request body content or a resource to read the body stream |
|
1499 | 1498 | * |
1500 | 1499 | * @throws \LogicException |
1501 | 1500 | */ |
@@ -1928,6 +1927,9 @@ discard block |
||
1928 | 1927 | return false; |
1929 | 1928 | } |
1930 | 1929 | |
1930 | + /** |
|
1931 | + * @param string $content |
|
1932 | + */ |
|
1931 | 1933 | private static function createRequestFromFactory(array $query = array(), array $request = array(), array $attributes = array(), array $cookies = array(), array $files = array(), array $server = array(), $content = null) |
1932 | 1934 | { |
1933 | 1935 | if (self::$requestFactory) { |