Skip to content

Commit 6cb2403

Browse files
committed
Fixed syntax error in tag::minify().
Updated some incorrect types in phpDoc tags.
1 parent 9fab492 commit 6cb2403

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/htmldoc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function offsetGet(mixed $i) : mixed { // return reference so you can set
127127
/**
128128
* Retrieve the document node in the current position
129129
*
130-
* @return tag|text|comment|doctype The child node at the current pointer position
130+
* @return tag|text|comment|doctype|null The child node at the current pointer position or null if there are no children
131131
*/
132132
public function current() : mixed {
133133
return $this->children[$this->pointer] ?? null;

src/tokens/tag.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
use \hexydec\tokens\tokenise;
55

66
/**
7-
* @property \hexydec\html\tag $parent
7+
* @property tag|null $parent
88
* @property htmldoc $root
99
* @property array $config
1010
* @property tag|null $parent
@@ -744,7 +744,7 @@ public function find(array $selector, bool $searchChildren = true) : array {
744744

745745
// match first-child
746746
case 'first-child':
747-
$children = !== null ? $this->parent->children() : [];
747+
$children = $this->parent !== null ? $this->parent->children() : [];
748748
if (!isset($children[0]) || $this !== $children[0]) {
749749
$match = false;
750750
break 2;

0 commit comments

Comments
 (0)