Passed
Push — master ( 849c84...3dbed7 )
by Bruno
02:22
created

Framework::viewableCompose()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
nc 1
nop 3
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Formularium\Frontend\Materialize;
4
5
class Framework extends \Formularium\Framework
6
{
7
    public function __construct(string $name = 'Materialize')
8
    {
9
        parent::__construct($name);
10
    }
11
12
    public function htmlHead(): string
13
    {
14
        return '<meta name="viewport" content="width=device-width, initial-scale=1">
15
            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">';
16
    }
17
18
    public function htmlFooter(): string
19
    {
20
        return '<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>';
21
    }
22
23
    public function viewableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
24
    {
25
        return '<section class="section"><div class="container">' . $previousCompose . '</div></section>';
26
    }
27
28
    public function editableCompose(\Formularium\Model $m, array $elements, string $previousCompose): string
29
    {
30
        return '<section class="section"><div class="container">' . $previousCompose . '</div></section>';
31
    }
32
}
33