Passed
Push — master ( 2802ef...c7d11a )
by Bruno
06:54
created

Framework::editableCompose()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 3
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Formularium\Frontend\Buefy;
4
5
use Formularium\HTMLElement;
6
7
class Framework extends \Formularium\Framework
8
{
9
    public function __construct(string $name = 'Buefy')
10
    {
11
        parent::__construct($name);
12
    }
13
14
    public function htmlHead(HTMLElement &$head)
15
    {
16
        $head->appendContent(
17
            HTMLElement::factory('meta', ['name' => "viewport", 'content' => "width=device-width, initial-scale=1"])
18
        )->appendContent(
19
            HTMLElement::factory(
20
                'link',
21
                [
22
                    'rel' => "stylesheet",
23
                    'href' => "https://unpkg.com/buefy/dist/buefy.min.css",
24
                ]
25
            )
26
        )->appendContent(
27
            HTMLElement::factory(
28
                'script',
29
                [
30
                    'src' => "https://unpkg.com/buefy/dist/buefy.min.js",
31
                ]
32
            )
33
        );
34
    }
35
36
    public function viewableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
37
    {
38
        return $previousCompose;
39
    }
40
41
    public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
42
    {
43
        return $previousCompose;
44
    }
45
}
46