StandardDateFactory::map()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Popy\Calendar\Parser\ResultMapper;
4
5
use Popy\Calendar\Parser\DateLexerResult;
6
use Popy\Calendar\Parser\ResultMapperInterface;
7
use Popy\Calendar\ValueObject\DateRepresentationInterface;
8
use Popy\Calendar\ValueObject\DateRepresentation\Standard;
9
10
/**
11
 * Builds a standard date representation (to initialize a mapper chain).
12
 */
13
class StandardDateFactory implements ResultMapperInterface
14
{
15
    /**
16
     * @inheritDoc
17
     */
18
    public function map(DateLexerResult $parts, DateRepresentationInterface $date = null)
19
    {
20
        return new Standard();
21
    }
22
}
23