Code Duplication    Length = 25-25 lines in 3 locations

components/checkbox/controller.php 1 location

@@ 8-32 (lines=25) @@
5
/**
6
 * Implements a Checkbox UI component.
7
 */
8
class Component_checkbox
9
extends AbstractComponent
10
implements ValueComponentInterface
11
{
12
    public function default_model() 
13
    {
14
        return array(
15
            'name'          => '',
16
            'disabled'      => false,
17
            'required'      => false,
18
            'readonly'      => false,
19
            'data'          => array()
20
        );
21
    }
22
    
23
    public function required_arguments()
24
    {
25
        return array('name');
26
    }
27
    
28
    public function get_template_path() 
29
    {
30
        return __DIR__.'/template.phtml';
31
    }
32
}

components/radio/controller.php 1 location

@@ 8-32 (lines=25) @@
5
/**
6
 * Implements a Radio UI component.
7
 */
8
class Component_radio
9
extends AbstractComponent
10
implements ValueComponentInterface
11
{
12
    public function default_model() 
13
    {
14
        return array(
15
            'name'          => '',
16
            'disabled'      => false,
17
            'required'      => false,
18
            'readonly'      => false,
19
            'data'          => array()
20
        );
21
    }
22
    
23
    public function required_arguments()
24
    {
25
        return array('name');
26
    }
27
    
28
    public function get_template_path() 
29
    {
30
        return __DIR__.'/template.phtml';
31
    }
32
}

components/select/controller.php 1 location

@@ 8-32 (lines=25) @@
5
/**
6
 * Implements a select UI component.
7
 */
8
class Component_select
9
extends AbstractComponent
10
implements ValueComponentInterface
11
{
12
    public function default_model() 
13
    {
14
        return array(
15
            'name'      => '',
16
            'disabled'  => false,
17
            'data'      => array(),
18
            'required'  => false,
19
            'readonly'  => false
20
        );
21
    }
22
    
23
    public function required_arguments()
24
    {
25
        return array('name','data');
26
    }
27
    
28
    public function get_template_path() 
29
    {
30
        return __DIR__.'/template.phtml';
31
    }
32
}