Passed
Push — main ( 5926a8...a239d4 )
by Garbuz
03:10
created

TextField::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GarbuzIvan\LaravelGeneratorPackage\Form\Fields;
6
7
use Closure;
8
use Exception;
9
use GarbuzIvan\LaravelGeneratorPackage\Configuration;
10
use GarbuzIvan\LaravelGeneratorPackage\Contracts\FieldInterface;
11
use Illuminate\Support\Facades\App;
12
13
class TextField extends FieldAbstract
14
{
15
    protected Configuration $config;
16
17
    /**
18
     * constructor.
19
     * @param Configuration $config
20
     */
21 15
    public function __construct(Configuration $config)
22
    {
23 15
        $this->config = $config;
24 15
    }
25
26
    /**
27
     * TextField init.
28
     * @param array $arguments
29
     * @throws Exception
30
     */
31 15
    public function init(array $arguments): FieldInterface
32
    {
33 15
        parent::init($arguments);
34 13
        $this->setType('string');
35 13
        $this->setLight(255);
36 13
        return $this;
37
    }
38
}
39