diff --git a/src/Dom/Query.php b/src/Dom/Query.php index 3eec330..7dc5b57 100644 --- a/src/Dom/Query.php +++ b/src/Dom/Query.php @@ -62,7 +62,7 @@ public function setHtml($html, $charset = null) * @param Closure|null $callback * @return Collection|static */ - public function getData(Closure $callback = null) + public function getData(?Closure $callback = null) { return $this->handleData($this->data, $callback); } @@ -136,7 +136,7 @@ public function removeHead() * @param Closure|null $callback * @return QueryList */ - public function query(Closure $callback = null) + public function query(?Closure $callback = null) { $this->data = $this->getList(); $this->data = $this->handleData($this->data, $callback);