Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions stubs/Timecop.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<?php

/**
* Time travel to specified timestamp and freeze
*
* @param DateTimeInterface|int $time
*
* @return bool
*/
function timecop_freeze($time) {}

/**
* Time travel to specified timestamp
*
* @param DateTimeInterface|int $time
*
* @return bool
*/
function timecop_travel($time) {}

/**
* @param float $scale
*/
function timecop_scale($scale) {}

/**
* Return from time travel to current time
*/
function timecop_return() {}

class Timecop
{
/**
* Time travel to specified timestamp and freeze
*
* @param DateTimeInterface|int $time
*
* @return bool
*/
public static function freeze($time) {}

/**
* Time travel to specified timestamp
*
* @param DateTimeInterface|int $time
*
* @return bool
*/
public static function travel($time) {}

/**
* @param float $scale
*/
public static function scale($scale) {}

/**
* Return from time travel to current time
*/
public static function return() {}
}

class TimecopDateTime extends DateTime {}

class TimecopOrigDateTime extends DateTime {}

class TimecopDateTimeImmutable extends DateTimeImmutable {}

class TimecopOrigDateTimeImmutable extends DateTimeImmutable {}