@@ -19,6 +19,9 @@ class ClockMock
19
19
{
20
20
private static $ now ;
21
21
22
+ /**
23
+ * @return bool|null
24
+ */
22
25
public static function withClockMock ($ enable = null )
23
26
{
24
27
if (null === $ enable ) {
@@ -30,6 +33,9 @@ public static function withClockMock($enable = null)
30
33
return null ;
31
34
}
32
35
36
+ /**
37
+ * @return int
38
+ */
33
39
public static function time ()
34
40
{
35
41
if (null === self ::$ now ) {
@@ -39,6 +45,9 @@ public static function time()
39
45
return (int ) self ::$ now ;
40
46
}
41
47
48
+ /**
49
+ * @return int
50
+ */
42
51
public static function sleep ($ s )
43
52
{
44
53
if (null === self ::$ now ) {
@@ -72,6 +81,9 @@ public static function microtime($asFloat = false)
72
81
return sprintf ('%0.6f00 %d ' , self ::$ now - (int ) self ::$ now , (int ) self ::$ now );
73
82
}
74
83
84
+ /**
85
+ * @return string
86
+ */
75
87
public static function date ($ format , $ timestamp = null )
76
88
{
77
89
if (null === $ timestamp ) {
@@ -81,6 +93,9 @@ public static function date($format, $timestamp = null)
81
93
return \date ($ format , $ timestamp );
82
94
}
83
95
96
+ /**
97
+ * @return string
98
+ */
84
99
public static function gmdate ($ format , $ timestamp = null )
85
100
{
86
101
if (null === $ timestamp ) {
@@ -90,6 +105,9 @@ public static function gmdate($format, $timestamp = null)
90
105
return \gmdate ($ format , $ timestamp );
91
106
}
92
107
108
+ /**
109
+ * @return array|int|float
110
+ */
93
111
public static function hrtime ($ asNumber = false )
94
112
{
95
113
$ ns = (self ::$ now - (int ) self ::$ now ) * 1000000000 ;
0 commit comments