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

Number::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
}