Script   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A show() 0 3 1
1
<?php
2
3
namespace pjpawel\Magis\Helper;
4
5
/**
6
 * @author Paweł Podgórski <[email protected]>
7
 */
8
class Script extends AbstractComponent
9
{
10
11
    private string $script;
12
13
    public function __construct(string $script)
14
    {
15
        $this->script = $script;
16
    }
17
18
    public function show(): string
19
    {
20
        return '<script>' . $this->script . '</script>';
21
    }
22
}