Passed
Push — master ( d63a45...8016ac )
by Iman
09:10
created

ApiHooks::hookValidate()   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
3
namespace Crocodicstudio\Crudbooster\Controllers\ApiController;
4
5
trait ApiHooks
6
{
7
    public function hookBefore($data)
8
    {
9
        return $data;
10
    }
11
12
    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

12
    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...
13
    {
14
        return $result;
15
    }
16
17
    public function hookValidate($data)
18
    {
19
        return $data;
20
    }
21
22
    public function hookQuery($query)
23
    {
24
        return $query;
25
    }
26
}