Passed
Branch isEqualNode (8a5aae)
by Josh
02:01
created

NodePolyfill   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 5
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A isEqualNode() 0 3 1
1
<?php declare(strict_types=1);
2
3
/**
4
* @package   s9e\SweetDOM
5
* @copyright Copyright (c) The s9e authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\SweetDOM\NodeTraits;
9
10
use DOMAttr;
11
use DOMCharacterData;
12
use DOMElement;
13
use DOMNode;
14
use s9e\SweetDOM\NodeComparator;
15
16
trait NodePolyfill
17
{
18
	public function isEqualNode(?DOMNode $otherNode): bool
19
	{
20
		return NodeComparator::isEqualNode($this, $otherNode);
1 ignored issue
show
Bug introduced by
$this of type s9e\SweetDOM\NodeTraits\NodePolyfill is incompatible with the type DOMNode|null expected by parameter $node of s9e\SweetDOM\NodeComparator::isEqualNode(). ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

20
		return NodeComparator::isEqualNode(/** @scrutinizer ignore-type */ $this, $otherNode);
Loading history...
21
	}
22
}