@@ -31,18 +31,18 @@ |
||
31 | 31 | */ |
32 | 32 | interface ITimeFactory { |
33 | 33 | |
34 | - /** |
|
35 | - * @return int the result of a call to time() |
|
36 | - * @since 8.0.0 |
|
37 | - */ |
|
38 | - public function getTime(): int; |
|
34 | + /** |
|
35 | + * @return int the result of a call to time() |
|
36 | + * @since 8.0.0 |
|
37 | + */ |
|
38 | + public function getTime(): int; |
|
39 | 39 | |
40 | - /** |
|
41 | - * @param string $time |
|
42 | - * @param \DateTimeZone $timezone |
|
43 | - * @return \DateTime |
|
44 | - * @since 15.0.0 |
|
45 | - */ |
|
46 | - public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime; |
|
40 | + /** |
|
41 | + * @param string $time |
|
42 | + * @param \DateTimeZone $timezone |
|
43 | + * @return \DateTime |
|
44 | + * @since 15.0.0 |
|
45 | + */ |
|
46 | + public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime; |
|
47 | 47 | |
48 | 48 | } |
@@ -34,21 +34,21 @@ |
||
34 | 34 | class TimeFactory implements ITimeFactory { |
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * @return int the result of a call to time() |
|
39 | - */ |
|
40 | - public function getTime(): int { |
|
41 | - return time(); |
|
42 | - } |
|
43 | - |
|
44 | - /** |
|
45 | - * @param string $time |
|
46 | - * @param \DateTimeZone $timezone |
|
47 | - * @return \DateTime |
|
48 | - * @since 15.0.0 |
|
49 | - */ |
|
50 | - public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime { |
|
51 | - return new \DateTime($time, $timezone); |
|
52 | - } |
|
37 | + /** |
|
38 | + * @return int the result of a call to time() |
|
39 | + */ |
|
40 | + public function getTime(): int { |
|
41 | + return time(); |
|
42 | + } |
|
43 | + |
|
44 | + /** |
|
45 | + * @param string $time |
|
46 | + * @param \DateTimeZone $timezone |
|
47 | + * @return \DateTime |
|
48 | + * @since 15.0.0 |
|
49 | + */ |
|
50 | + public function getDateTime(string $time = 'now', \DateTimeZone $timezone = null): \DateTime { |
|
51 | + return new \DateTime($time, $timezone); |
|
52 | + } |
|
53 | 53 | |
54 | 54 | } |