Passed
Push — feature/0.7.0 ( cbd99f...49f0a6 )
by Ryuichi
42:21
created

Number::isValid()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 2
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace WebStream\Annotation\Attributes\Ext\ValidateRule;
3
4
/**
5
 * Number
6
 * @author Ryuichi TANAKA.
7
 * @since 2015/03/30
8
 * @version 0.4
9
 */
10
class Number implements IValidate
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function isValid($value, $rule)
16
    {
17
        return $value === null || is_numeric($value);
18
    }
19
}
20