Skip to content

Commit 22442e5

Browse files
authored
Merge pull request #27 from IonBazan/stubs
Added class and function stubs
2 parents 90580db + 19d6a85 commit 22442e5

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

stubs/Timecop.php

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?php
2+
3+
/**
4+
* Time travel to specified timestamp and freeze
5+
*
6+
* @param DateTimeInterface|int $time
7+
*
8+
* @return bool
9+
*/
10+
function timecop_freeze($time) {}
11+
12+
/**
13+
* Time travel to specified timestamp
14+
*
15+
* @param DateTimeInterface|int $time
16+
*
17+
* @return bool
18+
*/
19+
function timecop_travel($time) {}
20+
21+
/**
22+
* @param float $scale
23+
*/
24+
function timecop_scale($scale) {}
25+
26+
/**
27+
* Return from time travel to current time
28+
*/
29+
function timecop_return() {}
30+
31+
class Timecop
32+
{
33+
/**
34+
* Time travel to specified timestamp and freeze
35+
*
36+
* @param DateTimeInterface|int $time
37+
*
38+
* @return bool
39+
*/
40+
public static function freeze($time) {}
41+
42+
/**
43+
* Time travel to specified timestamp
44+
*
45+
* @param DateTimeInterface|int $time
46+
*
47+
* @return bool
48+
*/
49+
public static function travel($time) {}
50+
51+
/**
52+
* @param float $scale
53+
*/
54+
public static function scale($scale) {}
55+
56+
/**
57+
* Return from time travel to current time
58+
*/
59+
public static function return() {}
60+
}
61+
62+
class TimecopDateTime extends DateTime {}
63+
64+
class TimecopOrigDateTime extends DateTime {}
65+
66+
class TimecopDateTimeImmutable extends DateTimeImmutable {}
67+
68+
class TimecopOrigDateTimeImmutable extends DateTimeImmutable {}

0 commit comments

Comments
 (0)