Completed
Push — master ( 4066ce...b4c895 )
by Sebastian
03:10
created

Number::sanitize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 8
ccs 5
cts 5
cp 1
crap 2
rs 9.4285
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
 * Check required.
16
 */
17
class Number extends AbstractNumber
18
{
19
    /**
20
     * @var array Arguments expected.
21
     */
22
    private $arguments = [];
0 ignored issues
show
introduced by
The private property $arguments is not used, and could be removed.
Loading history...
23
    
24
    /**
25
     * Validate.
26
     *
27
     * @return bool
28
     */
29 20
    public function validate($received): bool
30
    {
31 20
        return !is_numeric($received);
32
    }
33
}
34