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

NodePolyfill::isEqualNode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

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