Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
Time
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getDateFormat
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 isStrictFormat
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\DateValueObjects;
3
4use Apie\DateValueObjects\Concerns\CanCreateInstanceFromDateTimeObject;
5use Apie\DateValueObjects\Concerns\CanHaveTimeIntervals;
6use Apie\DateValueObjects\Concerns\IsDateValueObject;
7use Apie\DateValueObjects\Interfaces\WorksWithTimeIntervals;
8
9/**
10 * Represents a time only in a 24h format accurate to
11 * the second.
12 *
13 * For example:
14 * 01:00:23, 23:00:23
15 *
16 * Hours, minutes and seconds lower than 10 will be prefixed with 0.
17 */
18final class Time implements WorksWithTimeIntervals
19{
20    use CanCreateInstanceFromDateTimeObject;
21    use CanHaveTimeIntervals;
22    use IsDateValueObject;
23
24    public static function getDateFormat(): string
25    {
26        return 'H:i:s';
27    }
28
29    protected function isStrictFormat(): bool
30    {
31        return true;
32    }
33}