Passed
Branch master (f271f4)
by Tarmo
32:34
created

RestResourceCreate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 20
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
wmc 2
1
<?php
2
declare(strict_types = 1);
3
/**
4
 * /src/Rest/Traits/RestResourceCreate.php
5
 *
6
 * @author  TLe, Tarmo Leppänen <[email protected]>
7
 */
8
namespace App\Rest\Traits;
9
10
use App\DTO\RestDtoInterface;
11
use App\Entity\EntityInterface;
12
13
/**
14
 * Trait RestResourceCreate
15
 *
16
 * @package App\Rest\Traits
17
 * @author  TLe, Tarmo Leppänen <[email protected]>
18
 */
19
trait RestResourceCreate
20
{
21
    /**
22
     * Before lifecycle method for create method.
23
     *
24
     * @param RestDtoInterface $dto
25
     * @param EntityInterface  $entity
26
     */
27
    public function beforeCreate(RestDtoInterface $dto, EntityInterface $entity): void
28
    {
29
    }
30
31
    /**
32
     * After lifecycle method for create method.
33
     *
34
     * @param RestDtoInterface $dto
35
     * @param EntityInterface  $entity
36
     */
37
    public function afterCreate(RestDtoInterface $dto, EntityInterface $entity): void
38
    {
39
    }
40
}
41