Double   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 18
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 4 1
1
<?php
2
3
/**
4
 * A Double field
5
 */
6
namespace Rocket\Entities\Fields;
7
8
use Rocket\Entities\Field;
9
10
/**
11
 * A Double field
12
 *
13
 * @property float $value The value to store
14
 */
15
class Double extends Field
16
{
17
    /**
18
     * @var string The table associated with the model.
19
     */
20
    public $table = 'field_double';
21
22
    /**
23
     * Checks if a field is valid
24
     *
25
     * @param mixed $value The value to validate
26
     * @return bool
27
     */
28 15
    protected function isValid($value)
29
    {
30 15
        return is_numeric($value);
31
    }
32
}
33