for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* User: alec
* Date: 12.10.18
* Time: 14:18
*/
namespace AlecRabbit;
* Create a new Carbon instance for the current time.
*
* @param \DateTimeZone|string|null $tz
* @return \Carbon\Carbon
* @throws \Exception
function now($tz = null)
{
return new \Carbon\Carbon(null, $tz);
}
* @param mixed ...$args
function carbon(...$args)
return new \Carbon\Carbon(...$args);
$args
$time
Carbon\Carbon::__construct()
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
ignore-type
return new \Carbon\Carbon(/** @scrutinizer ignore-type */ ...$args);
* Calculate timestamp of start of interval.
* @param int $timestamp
* @param int $interval
* @return int
function base_timestamp(int $timestamp, int $interval = 60): int
return \intdiv($timestamp, $interval) * $interval;