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

RestResourceFind   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 33
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/RestResourceFind.php
5
 *
6
 * @author  TLe, Tarmo Leppänen <[email protected]>
7
 */
8
namespace App\Rest\Traits;
9
10
use App\Entity\EntityInterface;
11
12
/**
13
 * Trait RestResourceFind
14
 *
15
 * @package App\Rest\Traits
16
 * @author  TLe, Tarmo Leppänen <[email protected]>
17
 */
18
trait RestResourceFind
19
{
20
    /**
21
     * Before lifecycle method for find method.
22
     *
23
     * @param array   $criteria
24
     * @param array   $orderBy
25
     * @param integer $limit
26
     * @param integer $offset
27
     * @param array   $search
28
     */
29
    public function beforeFind(array &$criteria, array &$orderBy, int &$limit, int &$offset, array &$search): void
30
    {
31
    }
32
33
    /**
34
     * After lifecycle method for find method.
35
     *
36
     * @param array             $criteria
37
     * @param array             $orderBy
38
     * @param integer           $limit
39
     * @param integer           $offset
40
     * @param array             $search
41
     * @param EntityInterface[] $entities
42
     */
43
    public function afterFind(
44
        array &$criteria,
45
        array &$orderBy,
46
        int &$limit,
47
        int &$offset,
48
        array &$search,
49
        array &$entities
50
    ): void {
51
    }
52
}
53