Passed
Push — master ( d26101...1eb4af )
by Gabor
03:11
created

ButtonElement   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setValue() 0 5 1
A getValue() 0 4 1
1
<?php
2
/**
3
 * WebHemi.
4
 *
5
 * PHP version 5.6
6
 *
7
 * @copyright 2012 - 2016 Gixx-web (http://www.gixx-web.com)
8
 * @license   https://opensource.org/licenses/MIT The MIT License (MIT)
9
 *
10
 * @link      http://www.gixx-web.com
11
 */
12
namespace WebHemi\Form\Element\Web;
13
14
/**
15
 * Class ButtonElement.
16
 */
17
class ButtonElement extends InputElement
18
{
19
    /** @var string */
20
    protected $type = 'button';
21
22
    /**
23
     * Skip original behaviour: button element does not have value.
24
     *
25
     * @param mixed $value
26
     * @return AbstractElement
27
     */
28 1
    public function setValue($value)
29
    {
30 1
        unset($value);
31 1
        return $this;
32
    }
33
34
    /**
35
     * Skip original behaviour: button element does not have value.
36
     *
37
     * @return mixed
38
     */
39 1
    public function getValue()
40
    {
41 1
        return '';
42
    }
43
}
44