Spinner::getMetadata()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 6
rs 10
1
<?php declare(strict_types=1);
2
3
namespace Formularium\Frontend\Bootstrap\Element;
4
5
use Formularium\Element;
6
use Formularium\HTMLNode;
7
use Formularium\Metadata;
8
use Formularium\MetadataParameter;
9
use Formularium\Frontend\HTML\Framework;
10
11
class Spinner extends Element
12
{
13
    public function render(array $parameters, HTMLNode $previous): HTMLNode
14
    {
15
        return HTMLNode::factory(
16
            'div',
17
            [
18
                'class' => 'formularium-spinner spinner-border',
19
                'role' => 'status'
20
            ],
21
            HTMLNode::factory(
22
                'span',
23
                [ 'class' => "sr-only" ],
24
                'Loading...'
25
            )
26
        );
27
    }
28
29
    public static function getMetadata(): Metadata
30
    {
31
        return new Metadata(
32
            'Spinner',
33
            'Creates a spinner',
34
            [
35
            ]
36
        );
37
    }
38
}
39