Completed
Push — master ( 0c75f6...35d3bb )
by Stéphane
14:38
created

StringField   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isValid() 0 4 2
1
<?php namespace Rocket\Entities\Fields;
2
3
use Rocket\Entities\Field;
4
5
/**
6
 * Date Field
7
 *
8
 * @property string $value The field's value
9
 */
10
class StringField extends Field
11
{
12
    public $table = 'field_string';
13
14
    /**
15
     * {@inheritdoc}
16
     */
17 141
    protected function isValid($value)
18
    {
19 141
        return is_string($value) && strlen($value) <= 255;
20
    }
21
}
22