Completed
Pull Request — master (#103)
by Asmir
03:32
created

Html5::parse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
ccs 8
cts 8
cp 1
rs 9.4285
cc 1
eloc 8
nc 1
nop 2
crap 1
1
<?php
2
namespace Masterminds;
3
4
use Masterminds\Html5\Parser\FileInputStream;
5
use Masterminds\Html5\Parser\StringInputStream;
6
use Masterminds\Html5\Parser\DOMTreeBuilder;
7
use Masterminds\Html5\Parser\Scanner;
8
use Masterminds\Html5\Parser\Tokenizer;
9
use Masterminds\Html5\Serializer\OutputRules;
10
use Masterminds\Html5\Serializer\Traverser;
11
12
class Html5 extends AbstractHtml5
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type Masterminds\Html5 has been defined more than once; this definition is ignored, only the first definition in src/HTML5.php (L12-16) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
13
{
14
15
16
}
17