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

RestResourceUpdate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 22
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/RestResourceUpdate.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 RestResourceUpdate
15
 *
16
 * @package App\Rest\Traits
17
 * @author  TLe, Tarmo Leppänen <[email protected]>
18
 */
19
trait RestResourceUpdate
20
{
21
    /**
22
     * Before lifecycle method for update method.
23
     *
24
     * @param string           $id
25
     * @param RestDtoInterface $dto
26
     * @param EntityInterface  $entity
27
     */
28
    public function beforeUpdate(string &$id, RestDtoInterface $dto, EntityInterface $entity): void
29
    {
30
    }
31
32
    /**
33
     * After lifecycle method for update method.
34
     *
35
     * @param string           $id
36
     * @param RestDtoInterface $dto
37
     * @param EntityInterface  $entity
38
     */
39
    public function afterUpdate(string &$id, RestDtoInterface $dto, EntityInterface $entity): void
40
    {
41
    }
42
}
43