@@ -56,6 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | /** |
58 | 58 | * @internal Only for the purpose of Ivory itself. |
59 | + * @param integer $inf |
|
59 | 60 | */ |
60 | 61 | final protected function __construct($inf, \DateTimeImmutable $dt = null) |
61 | 62 | { |
@@ -178,7 +179,7 @@ discard block |
||
178 | 179 | |
179 | 180 | /** |
180 | 181 | * @param \DateTimeZone $timezone timezone to create the {@link \DateTime} object with |
181 | - * @return \DateTime|null the date/time represented as a {@link \DateTimeImmutable} object; |
|
182 | + * @return null|\DateTimeImmutable the date/time represented as a {@link \DateTimeImmutable} object; |
|
182 | 183 | * <tt>null</tt> iff the date/time is not finite |
183 | 184 | */ |
184 | 185 | public function toDateTimeImmutable(\DateTimeZone $timezone = null) |
@@ -233,6 +234,13 @@ discard block |
||
233 | 234 | } |
234 | 235 | |
235 | 236 | |
237 | + /** |
|
238 | + * @param integer $years |
|
239 | + * @param integer $months |
|
240 | + * @param integer $days |
|
241 | + * @param integer $hours |
|
242 | + * @param integer $minutes |
|
243 | + */ |
|
236 | 244 | final protected function addPartsImpl($years, $months, $days, $hours, $minutes, $seconds) |
237 | 245 | { |
238 | 246 | if ($this->inf) { |
@@ -287,7 +287,7 @@ |
||
287 | 287 | $i += $lzsLen - 1; |
288 | 288 | continue; |
289 | 289 | } |
290 | - $result .= (ltrim($fields[$i], '0') ? : '0'); |
|
290 | + $result .= (ltrim($fields[$i], '0') ?: '0'); |
|
291 | 291 | } |
292 | 292 | if ($lzsStart + $lzsLen == 8) { |
293 | 293 | $result .= ':'; |
@@ -36,7 +36,7 @@ |
||
36 | 36 | throw new \InvalidArgumentException('Invalid syntax of hstore value'); |
37 | 37 | } |
38 | 38 | |
39 | - $k = ($m[2][0] ? : $this->unescapeAtom($m[1][0])); |
|
39 | + $k = ($m[2][0] ?: $this->unescapeAtom($m[1][0])); |
|
40 | 40 | $v = (!empty($m[4][0]) ? null : (!empty($m[5][0]) ? $m[5][0] : $this->unescapeAtom($m[3][0]))); |
41 | 41 | $result[$k] = $v; |
42 | 42 |
@@ -164,7 +164,7 @@ |
||
164 | 164 | } |
165 | 165 | |
166 | 166 | /** |
167 | - * @param IConnection|string $conn (name of) connection to use as the default connection |
|
167 | + * @param IConnection $conn (name of) connection to use as the default connection |
|
168 | 168 | * @throws \RuntimeException if the requested connection is not defined |
169 | 169 | */ |
170 | 170 | public static function useConnectionAsDefault($conn) |
@@ -10,9 +10,9 @@ |
||
10 | 10 | * plain array of matches, but an extended array: each item is a pair of the matching portion of the needle and the |
11 | 11 | * byte offset to the subject, like {@link preg_match_all()} does with the `PREG_OFFSET_CAPTURE` flag. |
12 | 12 | * |
13 | - * @param string|string[] $pattern |
|
13 | + * @param string $pattern |
|
14 | 14 | * @param callable $callback |
15 | - * @param string|string[] $subject |
|
15 | + * @param string $subject |
|
16 | 16 | * @param int $limit |
17 | 17 | * @param int|null $count |
18 | 18 | * @return string|string[] depending on whether <tt>$subject</tt> is <tt>string</tt> or <tt>array</tt>, |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | callable $callback, |
24 | 24 | $subject, |
25 | 25 | int $limit = -1, |
26 | - int &$count = null |
|
26 | + int & $count = null |
|
27 | 27 | ) |
28 | 28 | { |
29 | 29 | if (is_array($subject)) { |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | callable $callback, |
43 | 43 | string $subject, |
44 | 44 | int $limit = -1, |
45 | - int &$count = null |
|
45 | + int & $count = null |
|
46 | 46 | ): string |
47 | 47 | { |
48 | 48 | if (is_array($pattern)) { |
@@ -13,7 +13,7 @@ |
||
13 | 13 | class ConnectionException extends \RuntimeException |
14 | 14 | { |
15 | 15 | /** |
16 | - * @param string|resource $message alternatively to the message, a connection handler may be given - the last error |
|
16 | + * @param string $message alternatively to the message, a connection handler may be given - the last error |
|
17 | 17 | * message on this connection is considered then |
18 | 18 | * @param int $code |
19 | 19 | * @param Exception $previous |
@@ -75,6 +75,12 @@ discard block |
||
75 | 75 | } |
76 | 76 | } |
77 | 77 | |
78 | + /** |
|
79 | + * @param integer $month |
|
80 | + * @param integer $day |
|
81 | + * @param integer $hour |
|
82 | + * @param integer $minute |
|
83 | + */ |
|
78 | 84 | protected static function inRanges($month, $day, $hour, $minute, $second) |
79 | 85 | { |
80 | 86 | return ( |
@@ -88,6 +94,13 @@ discard block |
||
88 | 94 | ); |
89 | 95 | } |
90 | 96 | |
97 | + /** |
|
98 | + * @param integer $year |
|
99 | + * @param integer $month |
|
100 | + * @param integer $day |
|
101 | + * @param integer $hour |
|
102 | + * @param integer $minute |
|
103 | + */ |
|
91 | 104 | protected static function assertRanges($year, $month, $day, $hour, $minute, $second) |
92 | 105 | { |
93 | 106 | if ($year == 0) { |
@@ -202,7 +215,7 @@ discard block |
||
202 | 215 | * Adds a given number of seconds (1 by default) to this date/time and returns the result. Only affects finite |
203 | 216 | * dates. |
204 | 217 | * |
205 | - * @param int|float $seconds |
|
218 | + * @param integer $seconds |
|
206 | 219 | * @return static the date <tt>$seconds</tt> seconds after (or before, if negative) this date/time |
207 | 220 | */ |
208 | 221 | public function addSecond($seconds = 1) |
@@ -17,8 +17,8 @@ |
||
17 | 17 | /** |
18 | 18 | * Creates a new box from a corner and its opposite corner, each as either a {@link Point} or a pair of coordinates. |
19 | 19 | * |
20 | - * @param Point|float[] $corner |
|
21 | - * @param Point|float[] $oppositeCorner |
|
20 | + * @param null|Point $corner |
|
21 | + * @param null|Point $oppositeCorner |
|
22 | 22 | * @return Box |
23 | 23 | */ |
24 | 24 | public static function fromOppositeCorners($corner, $oppositeCorner): Box |
@@ -15,7 +15,7 @@ |
||
15 | 15 | /** |
16 | 16 | * Creates a new circle by its center point and radius. |
17 | 17 | * |
18 | - * @param Point|float[] $center the center point |
|
18 | + * @param null|Point $center the center point |
|
19 | 19 | * @param float $radius radius of the circle |
20 | 20 | * @return Circle |
21 | 21 | */ |