BaseAreaElement   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 23
rs 10
c 0
b 0
f 0
wmc 3
lcom 2
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getTagHtml() 0 4 1
A afterElementPrepareToRender() 0 4 1
1
<?php
2
3
namespace Ngtfkx\Laradeck\FormBuilder\Elements;
4
5
6
abstract class BaseAreaElement extends AbstractElement
7
{
8
    protected $needClose = true;
9
10
    public function __construct(?string $name = null, ?string $value = null)
11
    {
12
        parent::__construct();
13
14
        $this->name($name);
15
16
        $this->value($value);
17
    }
18
19
    public function afterElementPrepareToRender(): void
20
    {
21
        $this->parts->put('value', null);
22
    }
23
24
    public function getTagHtml()
25
    {
26
        return '<' . $this->tag . '**attributes**>' . $this->value . '</' . $this->tag . '>';
27
    }
28
}