Special   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
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 20
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A comment() 0 4 1
A doctype() 0 4 2
1
<?php
2
3
namespace BestServedCold\HTMLBuilder\Html;
4
5
/**
6
 * Class NonStandard
7
 * 
8
 * @package BestServedCold\HTMLBuilder\Html
9
 */
10
trait Special
11
{
12
    /**
13
     * @param  null    $value
14
     * @return Node
15
     */
16 1
    public static function comment($value = null)
17
    {
18 1
        return (new Node('!--' . $value . '--'))->void();
19
    }
20
21
    /**
22
     * @param  null    $value
23
     * @return Node
24
     */
25 1
    public static function doctype($value = null)
26
    {
27 1
        return (new Node('!DOCTYPE'))->attribute($value ?: 'html')->void();
28
    }
29
}
30