Passed
Push — master ( 052cde...5b58f4 )
by Josh
12:04
created

ParsedDOM   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadXML() 0 6 1
1
<?php declare(strict_types=1);
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) The s9e authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Utils;
9
10
use const LIBXML_NONET;
11
use s9e\TextFormatter\Utils\ParsedDOM\Document;
12
13
abstract class ParsedDOM
14
{
15
	public static function loadXML(string $xml): Document
16
	{
17
		$dom = new Document;
18
		$dom->loadXML($xml, LIBXML_NONET);
19
20
		return $dom;
21
	}
22
}