Passed
Push — master ( 8016ac...3325dd )
by Iman
05:45 queued 51s
created

ApiHooks::hookQuery()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Crocodicstudio\Crudbooster\Modules\ApiGeneratorModule\ApiController;
3
4
trait ApiHooks
5
{
6
    public function hookBefore($data)
7
    {
8
        return $data;
9
    }
10
11
    public function hookAfter($data, $result)
0 ignored issues
show
Unused Code introduced by
The parameter $data is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

11
    public function hookAfter(/** @scrutinizer ignore-unused */ $data, $result)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
12
    {
13
        return $result;
14
    }
15
16
    public function hookValidate($data)
17
    {
18
        return $data;
19
    }
20
21
    public function hookQuery($query)
22
    {
23
        return $query;
24
    }
25
}