TextArea   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 12
c 2
b 0
f 0
dl 0
loc 20
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A template() 0 18 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Mohammad Shamaseen
5
 * Date: 09/04/19
6
 * Time: 12:02 م.
7
 */
8
9
namespace Shamaseen\Repository\Generator\Forms;
10
11
class TextArea extends Forms
12
{
13
    public function template()
14
    {
15
        $required = $this->column->getNotnull() ? 'required' : '';
16
17
        return str_replace(
18
            [
19
                '{{columnName}}',
20
                '{{type}}',
21
                '{{required}}',
22
                '{{label}}',
23
            ],
24
            [
25
                $this->column->getName(),
26
                $this->getType(),
27
                $required,
28
                ucfirst(str_replace('_', ' ', $this->column->getName())),
29
            ],
30
            $this->getFormStub('textArea')
31
        );
32
    }
33
}
34