Passed
Push — master ( fed342...00a718 )
by Bruno
09:40
created

Renderable_constant   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A editable() 0 3 1
A viewable() 0 3 1
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\HTML\Renderable;
4
5
use Formularium\Field;
6
use Formularium\Frontend\HTML\Renderable;
7
use Formularium\HTMLElement;
8
9
class Renderable_constant extends Renderable
10
{
11
    const HTML = 'CONSTANT_HTML';
12
13
    public function viewable($value, Field $field, HTMLElement $previous): HTMLElement
14
    {
15
        return $this->container(HTMLElement::factory('', [], self::HTML, true), $field);
16
    }
17
    
18
    public function editable($value, Field $field, HTMLElement $previous): HTMLElement
19
    {
20
        return $this->container(HTMLElement::factory('', [], self::HTML, true), $field);
21
    }
22
}
23