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

RestResourceFind::afterFind()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 6
dl 0
loc 8
ccs 1
cts 1
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
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