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

Text::miniSize()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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