ElementEmpty   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 10 2
1
<?php
2
3
namespace hemio\html\Abstract_;
4
5
/**
6
 * Empty HTML elements, e.g. the br-tag
7
 */
8
abstract class ElementEmpty extends Element
9
{
10
11
    /**
12
     * Simply gives the <code><tag /></code> element with the defined attributes
13
     *
14
     * @return string
15
     */
16
    public function __toString()
17
    {
18
        foreach ($this->hooksToString as $hook)
19
            $hook($this);
20
21
        return '<'.
22
            static::tagName().
23
            $this->getFormattedElementAttributes().
24
            ' />';
25
    }
26
}
27