phpcbf auto-fixes: string concatenation spacing, single-line class braces, closing brace placement.
23 lines
403 B
PHP
23 lines
403 B
PHP
<?php
|
|
|
|
namespace Tests\Fakes;
|
|
|
|
use App\Auth\Clock;
|
|
use DateTimeImmutable;
|
|
|
|
class FakeClock implements Clock
|
|
{
|
|
public function __construct(private DateTimeImmutable $currentTime)
|
|
{
|
|
}
|
|
|
|
public function now(): DateTimeImmutable
|
|
{
|
|
return $this->currentTime;
|
|
}
|
|
|
|
public function setTime(DateTimeImmutable $newTime): void
|
|
{
|
|
$this->currentTime = $newTime;
|
|
}
|
|
}
|