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

TagMapper::queueCreate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
c 0
b 0
f 0
nc 1
nop 3
dl 0
loc 8
rs 10
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