• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

azjezz / psl / 11661132391

04 Nov 2024 09:07AM UTC coverage: 98.565% (-0.1%) from 98.691%
11661132391

Pull #500

github

web-flow
Merge 70b4f15c6 into 77af04130
Pull Request #500: feat: Clock component

6 of 13 new or added lines in 3 files covered. (46.15%)

2 existing lines in 1 file now uncovered.

5358 of 5436 relevant lines covered (98.57%)

51.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Psl/Clock/SystemClock.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace Psl\Clock;
6

7
use Psl\Clock\ClockInterface;
8
use Psl\DateTime;
9

10
final readonly class SystemClock implements ClockInterface
11
{
12
    private function __construct(private DateTime\Timezone $timezone)
13
    {
NEW
14
    }
×
15

16
    public static function fromTimezone(DateTime\Timezone $timezone): self
17
    {
NEW
18
        return new self($timezone);
×
19
    }
20

21
    public static function fromSystemTimezone(): self
22
    {
NEW
23
        return new self(DateTime\Timezone::from(date_default_timezone_get()));
×
24
    }
25

26
    public function now(): DateTime\DateTimeInterface
27
    {
NEW
28
        return DateTime\DateTime::now($this->timezone);
×
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc