You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Crawler.php
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,7 @@ public function add($node)
122
122
} elseif (\is_string($node)) {
123
123
$this->addContent($node);
124
124
} elseif (null !== $node) {
125
-
thrownew \InvalidArgumentException(sprintf('Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "%s".', \is_object($node) ? \get_class($node) : \gettype($node)));
125
+
thrownew \InvalidArgumentException(sprintf('Expecting a DOMNodeList or DOMNode instance, an array, a string, or null, but got "%s".', get_debug_type($node)));
126
126
}
127
127
}
128
128
@@ -802,7 +802,7 @@ public function link(string $method = 'get')
802
802
$node = $this->getNode(0);
803
803
804
804
if (!$nodeinstanceof \DOMElement) {
805
-
thrownew \InvalidArgumentException(sprintf('The selected node should be instance of DOMElement, got "%s".', \get_class($node)));
805
+
thrownew \InvalidArgumentException(sprintf('The selected node should be instance of DOMElement, got "%s".', get_debug_type($node)));
806
806
}
807
807
808
808
returnnewLink($node, $this->baseHref, $method);
@@ -820,7 +820,7 @@ public function links()
820
820
$links = [];
821
821
foreach ($this->nodesas$node) {
822
822
if (!$nodeinstanceof \DOMElement) {
823
-
thrownew \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', \get_class($node)));
823
+
thrownew \InvalidArgumentException(sprintf('The current node list should contain only DOMElement instances, "%s" found.', get_debug_type($node)));
0 commit comments