CustomSanitize   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 11
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A sanitize() 0 4 1
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