AlertBox   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 19
ccs 6
cts 6
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A alertBox() 0 5 1
A register() 0 3 1
1
<?php
2
3
namespace Bone\View\Extension\Plates;
4
5
use Bone\View\Helper\AlertBox as AlertBoxHelper;
6
use League\Plates\Engine;
7
use League\Plates\Extension\ExtensionInterface;
8
9
class AlertBox implements ExtensionInterface
10
{
11
    /**
12
     * @param Engine $engine
13
     */
14 1
    public function register(Engine $engine)
15
    {
16 1
        $engine->registerFunction('alert', [$this, 'alertBox']);
17 1
    }
18
19
    /**
20
     * @param array $message
21
     * @return string
22
     */
23 3
    public function alertBox(array $message) : string
24
    {
25 3
        $box = new AlertBoxHelper();
26
27 3
        return $box->alertBox($message);
28
    }
29
}
30