@@ -329,6 +329,9 @@ |
||
329 | 329 | ); |
330 | 330 | } |
331 | 331 | |
332 | + /** |
|
333 | + * @param string $string |
|
334 | + */ |
|
332 | 335 | protected static function getQuotedString($string) |
333 | 336 | { |
334 | 337 | $ret = null; |
@@ -1996,7 +1996,7 @@ discard block |
||
1996 | 1996 | * |
1997 | 1997 | * @param int $dayOfWeek |
1998 | 1998 | * |
1999 | - * @return mixed |
|
1999 | + * @return Carbon |
|
2000 | 2000 | */ |
2001 | 2001 | public function next($dayOfWeek = null) |
2002 | 2002 | { |
@@ -2015,7 +2015,7 @@ discard block |
||
2015 | 2015 | * |
2016 | 2016 | * @param int $dayOfWeek |
2017 | 2017 | * |
2018 | - * @return mixed |
|
2018 | + * @return Carbon |
|
2019 | 2019 | */ |
2020 | 2020 | public function previous($dayOfWeek = null) |
2021 | 2021 | { |
@@ -2034,7 +2034,7 @@ discard block |
||
2034 | 2034 | * |
2035 | 2035 | * @param int $dayOfWeek |
2036 | 2036 | * |
2037 | - * @return mixed |
|
2037 | + * @return Carbon |
|
2038 | 2038 | */ |
2039 | 2039 | public function firstOfMonth($dayOfWeek = null) |
2040 | 2040 | { |
@@ -2055,7 +2055,7 @@ discard block |
||
2055 | 2055 | * |
2056 | 2056 | * @param int $dayOfWeek |
2057 | 2057 | * |
2058 | - * @return mixed |
|
2058 | + * @return Carbon |
|
2059 | 2059 | */ |
2060 | 2060 | public function lastOfMonth($dayOfWeek = null) |
2061 | 2061 | { |
@@ -2096,7 +2096,7 @@ discard block |
||
2096 | 2096 | * |
2097 | 2097 | * @param int $dayOfWeek |
2098 | 2098 | * |
2099 | - * @return mixed |
|
2099 | + * @return Carbon |
|
2100 | 2100 | */ |
2101 | 2101 | public function firstOfQuarter($dayOfWeek = null) |
2102 | 2102 | { |
@@ -2111,7 +2111,7 @@ discard block |
||
2111 | 2111 | * |
2112 | 2112 | * @param int $dayOfWeek |
2113 | 2113 | * |
2114 | - * @return mixed |
|
2114 | + * @return Carbon |
|
2115 | 2115 | */ |
2116 | 2116 | public function lastOfQuarter($dayOfWeek = null) |
2117 | 2117 | { |
@@ -2147,7 +2147,7 @@ discard block |
||
2147 | 2147 | * |
2148 | 2148 | * @param int $dayOfWeek |
2149 | 2149 | * |
2150 | - * @return mixed |
|
2150 | + * @return Carbon |
|
2151 | 2151 | */ |
2152 | 2152 | public function firstOfYear($dayOfWeek = null) |
2153 | 2153 | { |
@@ -2162,7 +2162,7 @@ discard block |
||
2162 | 2162 | * |
2163 | 2163 | * @param int $dayOfWeek |
2164 | 2164 | * |
2165 | - * @return mixed |
|
2165 | + * @return Carbon |
|
2166 | 2166 | */ |
2167 | 2167 | public function lastOfYear($dayOfWeek = null) |
2168 | 2168 | { |
@@ -20,10 +20,16 @@ |
||
20 | 20 | 'case_separator', 'optional_comma' |
21 | 21 | )); |
22 | 22 | |
23 | +/** |
|
24 | + * @param string $regex |
|
25 | + */ |
|
23 | 26 | function regex($regex) { |
24 | 27 | return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; |
25 | 28 | } |
26 | 29 | |
30 | +/** |
|
31 | + * @param string $regex |
|
32 | + */ |
|
27 | 33 | function magicSplit($regex, $string) { |
28 | 34 | $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); |
29 | 35 |
@@ -154,6 +154,9 @@ discard block |
||
154 | 154 | ); |
155 | 155 | } |
156 | 156 | |
157 | +/** |
|
158 | + * @param integer $num |
|
159 | + */ |
|
157 | 160 | function assertArgs($num, $args, $name) { |
158 | 161 | if ($num != count($args)) { |
159 | 162 | die('Wrong argument count for ' . $name . '().'); |
@@ -213,10 +216,16 @@ discard block |
||
213 | 216 | /// Regex helper functions /// |
214 | 217 | ////////////////////////////// |
215 | 218 | |
219 | +/** |
|
220 | + * @param string $regex |
|
221 | + */ |
|
216 | 222 | function regex($regex) { |
217 | 223 | return '~' . LIB . '(?:' . str_replace('~', '\~', $regex) . ')~'; |
218 | 224 | } |
219 | 225 | |
226 | +/** |
|
227 | + * @param string $regex |
|
228 | + */ |
|
220 | 229 | function magicSplit($regex, $string) { |
221 | 230 | $pieces = preg_split(regex('(?:(?&string)|(?&comment)|(?&code))(*SKIP)(*FAIL)|' . $regex), $string); |
222 | 231 |
@@ -44,8 +44,6 @@ |
||
44 | 44 | /** |
45 | 45 | * Implements one or more interfaces. |
46 | 46 | * |
47 | - * @param Name|string $interface Name of interface to implement |
|
48 | - * @param Name|string $... More interfaces to implement |
|
49 | 47 | * |
50 | 48 | * @return $this The builder instance (for fluid interface) |
51 | 49 | */ |
@@ -25,8 +25,6 @@ |
||
25 | 25 | /** |
26 | 26 | * Extends one or more interfaces. |
27 | 27 | * |
28 | - * @param Name|string $interface Name of interface to extend |
|
29 | - * @param Name|string $... More interfaces to extend |
|
30 | 28 | * |
31 | 29 | * @return $this The builder instance (for fluid interface) |
32 | 30 | */ |
@@ -95,7 +95,7 @@ |
||
95 | 95 | /** |
96 | 96 | * Adds a statement. |
97 | 97 | * |
98 | - * @param Node|PhpParser\Builder $stmt The statement to add |
|
98 | + * @param Node\Expr\Print_ $stmt The statement to add |
|
99 | 99 | * |
100 | 100 | * @return $this The builder instance (for fluid interface) |
101 | 101 | */ |
@@ -142,7 +142,7 @@ |
||
142 | 142 | /** |
143 | 143 | * Sets the last part of the name. |
144 | 144 | * |
145 | - * @param string|array|self $name The name to set the last part to |
|
145 | + * @param string $name The name to set the last part to |
|
146 | 146 | */ |
147 | 147 | public function setLast($name) { |
148 | 148 | array_splice($this->parts, -1, 1, $this->prepareName($name)); |
@@ -105,6 +105,9 @@ |
||
105 | 105 | ); |
106 | 106 | } |
107 | 107 | |
108 | + /** |
|
109 | + * @param Name $type |
|
110 | + */ |
|
108 | 111 | protected function addAlias(Stmt\UseUse $use, $type) { |
109 | 112 | // Constant names are case sensitive, everything else case insensitive |
110 | 113 | if ($type === Stmt\Use_::TYPE_CONSTANT) { |