Skip to content

Commit

Permalink
WiP
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshyPHP committed Dec 29, 2023
1 parent 138e9f0 commit 1a20af1
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/ForwardCompatibleNodes/Attr.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
namespace s9e\SweetDOM\ForwardCompatibleNodes;

use s9e\SweetDOM\Attr as ParentClass;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class Attr extends ParentClass
{
use NodePolyfill;
}
3 changes: 2 additions & 1 deletion src/ForwardCompatibleNodes/CdataSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@
namespace s9e\SweetDOM\ForwardCompatibleNodes;

use s9e\SweetDOM\CdataSection as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeForwardCompatibility;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class CdataSection extends ParentClass
{
use ChildNodeForwardCompatibility;
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/ForwardCompatibleNodes/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

use s9e\SweetDOM\Comment as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeForwardCompatibility;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class Comment extends ParentClass
{
use ChildNodeForwardCompatibility;
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/ForwardCompatibleNodes/DocumentFragment.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
namespace s9e\SweetDOM\ForwardCompatibleNodes;

use s9e\SweetDOM\DocumentFragment as ParentClass;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodePolyfill;

class DocumentFragment extends ParentClass
{
use NodePolyfill;
use ParentNodePolyfill;
}
2 changes: 2 additions & 0 deletions src/ForwardCompatibleNodes/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@

use s9e\SweetDOM\Element as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeForwardCompatibility;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodePolyfill;

class Element extends ParentClass
{
use ChildNodeForwardCompatibility;
use NodePolyfill;
use ParentNodePolyfill;
}
2 changes: 2 additions & 0 deletions src/ForwardCompatibleNodes/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
namespace s9e\SweetDOM\ForwardCompatibleNodes;

use s9e\SweetDOM\NodeTraits\ChildNodeForwardCompatibility;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\Text as ParentClass;

class Text extends ParentClass
{
use ChildNodeForwardCompatibility;
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/NodeComparator.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public static function isEqualNode(?DOMNode $node, ?DOMNode $otherNode): bool
&& $node->systemId === $otherNode->systemId;
}

// @codeCoverageIgnoreStart
return $node->isSameNode($otherNode);
// @codeCoverageIgnoreEnd
}

/**
Expand Down
2 changes: 2 additions & 0 deletions src/PatchedNodes/Attr.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
namespace s9e\SweetDOM\PatchedNodes;

use s9e\SweetDOM\Attr as ParentClass;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class Attr extends ParentClass
{
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/PatchedNodes/CdataSection.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

use s9e\SweetDOM\CdataSection as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeWorkarounds;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class CdataSection extends ParentClass
{
use ChildNodeWorkarounds;
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/PatchedNodes/Comment.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@

use s9e\SweetDOM\Comment as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeWorkarounds;
use s9e\SweetDOM\NodeTraits\NodePolyfill;

class Comment extends ParentClass
{
use ChildNodeWorkarounds;
use NodePolyfill;
}
2 changes: 2 additions & 0 deletions src/PatchedNodes/DocumentFragment.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
namespace s9e\SweetDOM\PatchedNodes;

use s9e\SweetDOM\DocumentFragment as ParentClass;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodeWorkarounds;

class DocumentFragment extends ParentClass
{
use NodePolyfill;
use ParentNodePolyfill;
use ParentNodeWorkarounds;
}
2 changes: 2 additions & 0 deletions src/PatchedNodes/Element.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

use s9e\SweetDOM\Element as ParentClass;
use s9e\SweetDOM\NodeTraits\ChildNodeWorkarounds;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodePolyfill;
use s9e\SweetDOM\NodeTraits\ParentNodeWorkarounds;

class Element extends ParentClass
{
use ChildNodeWorkarounds;
use NodePolyfill;
use ParentNodePolyfill;
use ParentNodeWorkarounds;
}
2 changes: 2 additions & 0 deletions src/PatchedNodes/Text.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
namespace s9e\SweetDOM\PatchedNodes;

use s9e\SweetDOM\NodeTraits\ChildNodeWorkarounds;
use s9e\SweetDOM\NodeTraits\NodePolyfill;
use s9e\SweetDOM\Text as ParentClass;

class Text extends ParentClass
{
use ChildNodeWorkarounds;
use NodePolyfill;
}
1 change: 1 addition & 0 deletions tests/NodeComparatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use DOMDocument;
use DOMEntityReference;
use DOMException;
use DOMNode;
use DOMXPath;
use PHPUnit\Framework\Attributes\CoversClass;
Expand Down

0 comments on commit 1a20af1

Please sign in to comment.