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

Number   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 3 2
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