HTMLComponent   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 22
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getHTML() 0 4 1
A isValid() 0 4 1
1
<?php
2
3
namespace fieldwork\components;
4
5
class HTMLComponent extends Component
6
{
7
8
    private $html;
9
10
    public function __construct ($slug, $html)
11
    {
12
        parent::__construct($slug);
13
        $this->html = $html;
14
    }
15
16
    public function getHTML ($showLabel = true)
17
    {
18
        return $this->html;
19
    }
20
21
    public function isValid ()
22
    {
23
        return true;
24
    }
25
26
}