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

ParsedDOM::loadXML()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
cc 1
nc 1
nop 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
}