Component_select::get_template_path()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 4
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Amarkal\UI;
4
5
/**
6
 * Implements a select UI component.
7
 */
8 View Code Duplication
class Component_select
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
9
extends AbstractComponent
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
10
implements ValueComponentInterface, 
0 ignored issues
show
Coding Style introduced by
The implements keyword must be on the same line as the class name
Loading history...
Coding Style introduced by
The first item in a multi-line implements list must be on the line following the implements keyword
Loading history...
11
           DisableableComponentInterface
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
12
{
13
    public $component_type = 'select';
14
    
15
    public function default_model() 
16
    {   
17
        return array(
18
            'name'      => '',
19
            'id'        => '',
20
            'disabled'  => false,
21
            'data'      => array(),
22
            'required'  => false,
23
            'readonly'  => false,
24
            'default'   => null,
25
            'show'      => null
26
        );
27
    }
28
    
29
    public function required_arguments()
30
    {
31
        return array('name','data');
32
    }
33
    
34
    public function get_template_path() 
35
    {
36
        return __DIR__.'/template.phtml';
37
    }
38
}