Passed
Push — master ( f24587...5bef3b )
by Bruno
07:09
created

Renderable_datetime::editable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 7
ccs 0
cts 7
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Formularium\Frontend\Materialize\Renderable;
4
5
use Formularium\Field;
6
use Formularium\HTMLElement;
7
8
class Renderable_datetime extends Renderable_string
9
{
10
    public function editable($value, Field $field, HTMLElement $previous): HTMLElement
11
    {
12
        $element = parent::editable($value, $field, $previous);
13
        $input = $element->get('input')[0];
14
        $input->setTag('p');
15
        $input->setContent('Materialize does not have a datetime picker.');
16
        return $element;
17
    }
18
}
19