Completed
Push — master ( 6ea55f...555f37 )
by Alfred
01:52
created

Number   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 4
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: sjhc1170
5
 * Date: 18/05/2018
6
 * Time: 10:00
7
 */
8
9
namespace Iriven\Plugins\Form\Elements;
10
11
12
use \Iriven\Plugins\Form\Core\FormElement;
13
14
class Number extends FormElement
15
{
16
    public function __construct($label, $attributes)
17
    {
18
        parent::__construct($label, $attributes);
19
20
        $this->attributes->set('type','number');
0 ignored issues
show
Bug introduced by
The property attributes is declared private in Iriven\Plugins\Form\Core\FormElement and cannot be accessed from this context.
Loading history...
21
22
        if(!$this->attributes->has('min'))
23
            $this->attributes->set('min','0');
24
25
        if(!$this->attributes->has('max'))
26
            $this->attributes->set('max','100');
27
28
        if(!$this->attributes->has('step'))
29
            $this->attributes->set('step','1');
30
    }
31
32
}