CustomSanitize::sanitize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Linna Filter
5
 *
6
 * @author Sebastian Rapetti <[email protected]>
7
 * @copyright (c) 2018, Sebastian Rapetti
8
 * @license http://opensource.org/licenses/MIT MIT License
9
 */
10
declare(strict_types=1);
11
12
namespace Linna\Filter\Rules;
13
14
/**
15
 * Concrete Custom Sanitize rule class.
16
 */
17
class CustomSanitize extends AbstractCustom implements RuleSanitizeInterface
18
{
19
    /**
20
     * Sanitize.
21
     *
22
     * @param mixed $value
23
     */
24 1
    public function sanitize(&$received): void
25
    {
26
        //http://php.net/manual/en/migration70.incompatible.php#migration70.incompatible.variable-handling.indirect
27 1
        ($this->callback)($received);
28 1
    }
29
}
30