Completed
Push — master ( 9a9f3c...33ba23 )
by Denis
01:26
created

BaseAreaElement::beforeToParts()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
        $this->name($name);
13
14
        $this->value($value);
15
16
        parent::__construct();
17
    }
18
19
    protected function beforeToParts(): void
20
    {
21
22
    }
23
24
    protected function render(): string
25
    {
26
        $attributes = $this->generateAttributes();
27
28
        return '<' . $this->tag . $attributes . '>' . $this->value . '</' . $this->tag . '>';
29
    }
30
}