Skip to content

Commit 0be6ddb

Browse files
committed
docs: update PHPDoc types
1 parent fde0a67 commit 0be6ddb

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed

system/I18n/Time.php

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public function __construct(?string $time = null, $timezone = null, ?string $loc
105105
*
106106
* @param DateTimeZone|string|null $timezone
107107
*
108-
* @return Time
108+
* @return self
109109
*
110110
* @throws Exception
111111
*/
@@ -122,7 +122,7 @@ public static function now($timezone = null, ?string $locale = null)
122122
*
123123
* @param DateTimeZone|string|null $timezone
124124
*
125-
* @return Time
125+
* @return self
126126
*
127127
* @throws Exception
128128
*/
@@ -136,7 +136,7 @@ public static function parse(string $datetime, $timezone = null, ?string $locale
136136
*
137137
* @param DateTimeZone|string|null $timezone
138138
*
139-
* @return Time
139+
* @return self
140140
*
141141
* @throws Exception
142142
*/
@@ -150,7 +150,7 @@ public static function today($timezone = null, ?string $locale = null)
150150
*
151151
* @param DateTimeZone|string|null $timezone
152152
*
153-
* @return Time
153+
* @return self
154154
*
155155
* @throws Exception
156156
*/
@@ -164,7 +164,7 @@ public static function yesterday($timezone = null, ?string $locale = null)
164164
*
165165
* @param DateTimeZone|string|null $timezone
166166
*
167-
* @return Time
167+
* @return self
168168
*
169169
* @throws Exception
170170
*/
@@ -179,7 +179,7 @@ public static function tomorrow($timezone = null, ?string $locale = null)
179179
*
180180
* @param DateTimeZone|string|null $timezone
181181
*
182-
* @return Time
182+
* @return self
183183
*
184184
* @throws Exception
185185
*/
@@ -193,7 +193,7 @@ public static function createFromDate(?int $year = null, ?int $month = null, ?in
193193
*
194194
* @param DateTimeZone|string|null $timezone
195195
*
196-
* @return Time
196+
* @return self
197197
*
198198
* @throws Exception
199199
*/
@@ -207,7 +207,7 @@ public static function createFromTime(?int $hour = null, ?int $minutes = null, ?
207207
*
208208
* @param DateTimeZone|string|null $timezone
209209
*
210-
* @return Time
210+
* @return self
211211
*
212212
* @throws Exception
213213
*/
@@ -231,7 +231,7 @@ public static function create(?int $year = null, ?int $month = null, ?int $day =
231231
* @param string $datetime
232232
* @param DateTimeZone|string|null $timezone
233233
*
234-
* @return Time
234+
* @return self
235235
*
236236
* @throws Exception
237237
*/
@@ -250,7 +250,7 @@ public static function createFromFormat($format, $datetime, $timezone = null)
250250
*
251251
* @param DateTimeZone|string|null $timezone
252252
*
253-
* @return Time
253+
* @return self
254254
*
255255
* @throws Exception
256256
*/
@@ -265,7 +265,7 @@ public static function createFromTimestamp(int $timestamp, $timezone = null, ?st
265265
/**
266266
* Takes an instance of DateTimeInterface and returns an instance of Time with it's same values.
267267
*
268-
* @return Time
268+
* @return self
269269
*
270270
* @throws Exception
271271
*/
@@ -280,7 +280,7 @@ public static function createFromInstance(DateTimeInterface $dateTime, ?string $
280280
/**
281281
* Takes an instance of DateTime and returns an instance of Time with it's same values.
282282
*
283-
* @return Time
283+
* @return self
284284
*
285285
* @throws Exception
286286
*
@@ -316,7 +316,7 @@ public function toDateTime()
316316
* Creates an instance of Time that will be returned during testing
317317
* when calling 'Time::now' instead of the current time.
318318
*
319-
* @param DateTimeInterface|string|Time|null $datetime
319+
* @param DateTimeInterface|self|string|null $datetime
320320
* @param DateTimeZone|string|null $timezone
321321
*
322322
* @throws Exception
@@ -519,7 +519,7 @@ public function getTimezoneName(): string
519519
*
520520
* @param int|string $value
521521
*
522-
* @return Time
522+
* @return self
523523
*
524524
* @throws Exception
525525
*/
@@ -533,7 +533,7 @@ public function setYear($value)
533533
*
534534
* @param int|string $value
535535
*
536-
* @return Time
536+
* @return self
537537
*
538538
* @throws Exception
539539
*/
@@ -555,7 +555,7 @@ public function setMonth($value)
555555
*
556556
* @param int|string $value
557557
*
558-
* @return Time
558+
* @return self
559559
*
560560
* @throws Exception
561561
*/
@@ -579,7 +579,7 @@ public function setDay($value)
579579
*
580580
* @param int|string $value
581581
*
582-
* @return Time
582+
* @return self
583583
*
584584
* @throws Exception
585585
*/
@@ -597,7 +597,7 @@ public function setHour($value)
597597
*
598598
* @param int|string $value
599599
*
600-
* @return Time
600+
* @return self
601601
*
602602
* @throws Exception
603603
*/
@@ -615,7 +615,7 @@ public function setMinute($value)
615615
*
616616
* @param int|string $value
617617
*
618-
* @return Time
618+
* @return self
619619
*
620620
* @throws Exception
621621
*/
@@ -633,7 +633,7 @@ public function setSecond($value)
633633
*
634634
* @param int $value
635635
*
636-
* @return Time
636+
* @return self
637637
*
638638
* @throws Exception
639639
*/
@@ -660,7 +660,7 @@ protected function setValue(string $name, $value)
660660
*
661661
* @param DateTimeZone|string $timezone
662662
*
663-
* @return Time
663+
* @return self
664664
*
665665
* @throws Exception
666666
*/
@@ -677,7 +677,7 @@ public function setTimezone($timezone)
677677
*
678678
* @param int $timestamp
679679
*
680-
* @return Time
680+
* @return self
681681
*
682682
* @throws Exception
683683
*/
@@ -915,7 +915,7 @@ public function toLocalizedString(?string $format = null)
915915
* and are not required to be in the same timezone, as both times are
916916
* converted to UTC and compared that way.
917917
*
918-
* @param DateTimeInterface|string|Time $testTime
918+
* @param DateTimeInterface|self|string $testTime
919919
*
920920
* @throws Exception
921921
*/
@@ -933,7 +933,7 @@ public function equals($testTime, ?string $timezone = null): bool
933933
/**
934934
* Ensures that the times are identical, taking timezone into account.
935935
*
936-
* @param DateTimeInterface|string|Time $testTime
936+
* @param DateTimeInterface|self|string $testTime
937937
*
938938
* @throws Exception
939939
*/
@@ -957,7 +957,7 @@ public function sameAs($testTime, ?string $timezone = null): bool
957957
* Determines if the current instance's time is before $testTime,
958958
* after converting to UTC.
959959
*
960-
* @param mixed $testTime
960+
* @param DateTimeInterface|self|string $testTime
961961
*
962962
* @throws Exception
963963
*/
@@ -973,7 +973,7 @@ public function isBefore($testTime, ?string $timezone = null): bool
973973
* Determines if the current instance's time is after $testTime,
974974
* after converting in UTC.
975975
*
976-
* @param mixed $testTime
976+
* @param DateTimeInterface|self|string $testTime
977977
*
978978
* @throws Exception
979979
*/
@@ -997,7 +997,7 @@ public function isAfter($testTime, ?string $timezone = null): bool
997997
* - in 4 days
998998
* - 6 hours ago
999999
*
1000-
* @return mixed
1000+
* @return string
10011001
*
10021002
* @throws Exception
10031003
*/
@@ -1047,7 +1047,7 @@ public function humanize()
10471047
}
10481048

10491049
/**
1050-
* @param DateTimeInterface|string|Time $testTime
1050+
* @param DateTimeInterface|self|string $testTime
10511051
*
10521052
* @return TimeDifference
10531053
*
@@ -1068,7 +1068,7 @@ public function difference($testTime, ?string $timezone = null)
10681068
/**
10691069
* Returns a Time instance with the timezone converted to UTC.
10701070
*
1071-
* @param DateTimeInterface|string|Time $time
1071+
* @param DateTimeInterface|self|string $time
10721072
*
10731073
* @return DateTime|static
10741074
*
@@ -1139,7 +1139,7 @@ public function __toString(): string
11391139
*
11401140
* @param string $name
11411141
*
1142-
* @return mixed
1142+
* @return array|bool|DateTimeInterface|DateTimeZone|int|intlCalendar|self|string|null
11431143
*/
11441144
public function __get($name)
11451145
{

0 commit comments

Comments
 (0)