Completed
Push — master ( 82f5c2...aef2ab )
by wen
02:50
created

Text   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 32
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getSize() 0 4 1
A largeSize() 0 6 1
A miniSize() 0 6 1
A toArray() 0 6 1
1
<?php
2
3
4
namespace Sco\Admin\Form\Elements;
5
6
class Text extends Input
7
{
8
    protected $type = 'text';
9
10
    protected $size = '';
11
12
    public function getSize()
13
    {
14
        return $this->size;
15
    }
16
17
    public function largeSize()
18
    {
19
        $this->size = 'large';
20
21
        return $this;
22
    }
23
24
    public function miniSize()
25
    {
26
        $this->size = 'mini';
27
28
        return $this;
29
    }
30
31
    public function toArray()
32
    {
33
        return parent::toArray() + [
34
                'size' => $this->getSize(),
35
            ];
36
    }
37
}
38