StandardDateFactory   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toUnixTime() 0 2 1
A fromUnixTime() 0 3 1
1
<?php
2
3
namespace Popy\Calendar\Converter\UnixTimeConverter;
4
5
use Popy\Calendar\Converter\Conversion;
6
use Popy\Calendar\Converter\UnixTimeConverterInterface;
7
use Popy\Calendar\ValueObject\DateRepresentation\Standard;
8
9
/**
10
 * Instanciates a Gregorian date representation to initialize a Conversion->to
11
 * property. Has to be (one of) the first element in a chain.
12
 */
13
class StandardDateFactory implements UnixTimeConverterInterface
14
{
15
    /**
16
     * @inheritDoc
17
     */
18
    public function fromUnixTime(Conversion $conversion)
19
    {
20
        $conversion->setTo(new Standard());
21
    }
22
23
    /**
24
     * @inheritDoc
25
     */
26
    public function toUnixTime(Conversion $conversion)
27
    {
28
    }
29
}
30