Component_text   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 36
rs 10
c 1
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A default_model() 0 16 1
A required_arguments() 0 4 1
A get_template_path() 0 4 1
1
<?php
2
3
namespace Amarkal\UI;
4
5
/**
6
 * Implements a Text UI component.
7
 */
8
class Component_text
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
           FilterableComponentInterface,
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
13
           ValidatableComponentInterface
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
14
{
15
    public $component_type = 'text';
16
    
17
    public function default_model()
18
    {
19
        return array(
20
            'name'          => '',
21
            'id'            => '',
22
            'disabled'      => false,
23
            'placeholder'   => null,
24
            'size'          => null,
25
            'required'      => false,
26
            'readonly'      => false,
27
            'default'       => '',
28
            'filter'        => null,
29
            'validation'    => null,
30
            'show'          => null
31
        );
32
    }
33
    
34
    public function required_arguments()
35
    {
36
        return array('name');
37
    }
38
    
39
    public function get_template_path() 
40
    {
41
        return __DIR__.'/template.phtml';
42
    }
43
}