1 | <?php |
||
19 | class MongoTimestamp implements TypeInterface |
||
1 ignored issue
–
show
|
|||
20 | { |
||
21 | /** |
||
22 | * @var int |
||
23 | */ |
||
24 | private static $globalInc = 0; |
||
25 | |||
26 | /** |
||
27 | * @link http://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.sec |
||
28 | * @var int |
||
29 | */ |
||
30 | public $sec; |
||
31 | |||
32 | /** |
||
33 | * @link http://php.net/manual/en/class.mongotimestamp.php#mongotimestamp.props.inc |
||
34 | * @var int |
||
35 | */ |
||
36 | public $inc; |
||
37 | |||
38 | /** |
||
39 | * Creates a new timestamp. If no parameters are given, the current time is used |
||
40 | * and the increment is automatically provided. The increment is set to 0 when the |
||
41 | * module is loaded and is incremented every time this constructor is called |
||
42 | * (without the $inc parameter passed in). |
||
43 | * |
||
44 | * @link http://php.net/manual/en/mongotimestamp.construct.php |
||
45 | * @param int $sec [optional] Number of seconds since January 1st, 1970 |
||
46 | * @param int $inc [optional] Increment |
||
47 | */ |
||
48 | public function __construct($sec = 0, $inc = 0) |
||
71 | |||
72 | /** |
||
73 | * @return string |
||
74 | */ |
||
75 | public function __toString() |
||
79 | |||
80 | /** |
||
81 | * Converts this MongoTimestamp to the new BSON Timestamp type |
||
82 | * |
||
83 | * @return Timestamp |
||
84 | * @internal This method is not part of the ext-mongo API |
||
85 | */ |
||
86 | public function toBSONType() |
||
90 | } |
||
91 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.