Completed
Push — master ( 73de08...39d3cf )
by Gabor
03:53
created

ButtonElement   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 34
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
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
    /**
20
     * Returns the element type.
21
     *
22
     * @return string
23
     */
24
    public function getType()
25
    {
26
        return 'button';
27
    }
28
29
    /**
30
     * Skip original behaviour: button element does not have value.
31
     *
32
     * @param mixed $value
33
     * @return AbstractElement
34
     */
35
    public function setValue($value)
36
    {
37
        unset($value);
38
        return $this;
39
    }
40
41
    /**
42
     * Skip original behaviour: button element does not have value.
43
     *
44
     * @return mixed
45
     */
46
    public function getValue()
47
    {
48
        return '';
49
    }
50
}
51