Completed
Push — master ( 3a917b...8faa80 )
by Alexander
15s queued 12s
created

TagMapper   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 10
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A queueCreate() 0 8 1
1
<?php
2
3
namespace App\Blog\Tag;
4
5
use Cycle\ORM\Command\ContextCarrierInterface;
6
use Cycle\ORM\Heap\Node;
7
use Cycle\ORM\Heap\State;
8
use Cycle\ORM\Mapper\Mapper;
9
10
final class TagMapper extends Mapper
11
{
12
    public function queueCreate($entity, Node $node, State $state): ContextCarrierInterface
13
    {
14
        $command = parent::queueCreate($entity, $node, $state);
15
16
        $state->register('created_at', new \DateTimeImmutable(), true);
17
        $command->register('created_at', new \DateTimeImmutable(), true);
18
19
        return $command;
20
    }
21
}
22