CleaveNumericField   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
1
<?php
2
3
namespace LeKoala\FormElements;
4
5
use SilverStripe\ORM\DataObjectInterface;
6
7
/**
8
 * Format numeric field
9
 */
10
class CleaveNumericField extends CleaveField
11
{
12
    /**
13
     * Set this to true if internal value is seconds
14
     *
15
     * @var boolean
16
     */
17
    protected $isNumeric = false;
18
19
    public function __construct($name, $title = null, $value = null)
20
    {
21
        parent::__construct($name, $title, $value);
22
23
        $this->setCleaveType('numeral');
24
        $this->setConfig("numericOnly", true);
25
    }
26
}
27