HTMLHandler   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 27
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A draw() 0 10 2
1
<?php
2
3
namespace Kaloa\Renderer\Inigo\Handler;
4
5
use Kaloa\Renderer\Inigo\Handler\ProtoHandler;
6
use Kaloa\Renderer\Inigo\Parser;
7
8
/**
9
 *
10
 */
11
final class HTMLHandler extends ProtoHandler
12
{
13
    /**
14
     *
15
     */
16 18
    public function __construct()
17
    {
18 18
        $this->name = 'html';
19 18
        $this->type = Parser::TAG_OUTLINE | Parser::TAG_PRE | Parser::TAG_CLEAR_CONTENT;
20 18
    }
21
22
    /**
23
     *
24
     * @param  array  $data
25
     * @return string
26
     */
27 2
    public function draw(array $data)
28
    {
29 2
        $ret = '';
30
31 2
        if (!$data['front']) {
32 2
            $ret = $data['content'] . "\n\n";
33 2
        }
34
35 2
        return $ret;
36
    }
37
}
38