Completed
Pull Request — master (#26)
by Laurent
03:33 queued 01:50
created

Number   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setStep() 0 6 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace flightlog\form;
7
8
use Webmozart\Assert\Assert;
9
10
/**
11
 * @author Laurent De Coninck <[email protected]>
12
 */
13
class Number extends BaseInput
14
{
15
16
    /**
17
     * @param string $name
18
     * @param array  $options
19
     */
20
    public function __construct($name, array $options = [])
21
    {
22
        parent::__construct($name, FormElementInterface::TYPE_NUMBER, $options);
23
    }
24
25
    /**
26
     * @param string $step
27
     *
28
     * @return $this
29
     */
30
    public function setStep($step)
31
    {
32
        Assert::stringNotEmpty($step);
33
34
        return $this->setAttribute('step', $step);
35
    }
36
}