@@ -230,7 +230,7 @@ class HTMLNode implements Countable, Iterator {
230230 * [0-9], ':', '.' and '-'.</li>
231231 * <ul>
232232 *
233- * @param $attrs array An optional array that contains node attributes.
233+ * @param array $attrs An optional array that contains node attributes.
234234 *
235235 * @throws InvalidNodeNameException The method will throw an exception if given node
236236 * name is not valid.
@@ -380,7 +380,7 @@ public function addCommentNode(string $text) {
380380 *
381381 * @param string $text The text that will be in the node.
382382 *
383- * @param bool $escHtmlEntities If set to true, the method will
383+ * @param bool $esc If set to true, HTML entities will be escaped in text content.HtmlEntities If set to true, the method will
384384 * replace the characters '<', '>' and
385385 * '&' with the following HTML entities: '&lt;', '&gt;' and '&amp;'
386386 * in the given text. Default is true.
@@ -746,7 +746,7 @@ public static function createComment(string $text) : HTMLNode {
746746 * @param string $nodeText The text that will be inserted in the body
747747 * of the node.
748748 *
749- * @param bool $escHtmlEntities If set to true, the method will
749+ * @param bool $esc If set to true, HTML entities will be escaped in text content.HtmlEntities If set to true, the method will
750750 * replace the characters '<', '>' and
751751 * '&' with the following HTML entities: '&lt;', '&gt;' and '&amp;'
752752 * in the given text.
@@ -983,7 +983,7 @@ public function getChildByAttributeValue(string $attrName, string $attrVal) {
983983 /**
984984 * Returns a child node given its ID.
985985 *
986- * @param string $val The ID of the child.
986+ * @param string $val The value to search for. The ID of the child.
987987 *
988988 * @return null|HTMLNode The method returns an object of type HTMLNode
989989 * if found. If no node has the given ID, the method will return null.
@@ -1002,7 +1002,7 @@ public function getChildByID(string $val) {
10021002 * If the given tag name is empty string or the node has no children which has
10031003 * the given tag name, the returned list will be empty.
10041004 *
1005- * @param string $val The name of the tag (such as 'div' or 'a').
1005+ * @param string $val The value to search for. The name of the tag (such as 'div' or 'a').
10061006 *
10071007 * @return LinkedList A linked list that contains all child nodes which has the given
10081008 * tag name.
@@ -1229,7 +1229,7 @@ public function hasAttribute($attrName) : bool {
12291229 /**
12301230 * Checks if a given node is a direct child of the instance.
12311231 *
1232- * @param HTMLNode $node The node that will be checked.
1232+ * @param HTMLNode $node The HTML node to process. The node that will be checked.
12331233 *
12341234 * @return bool true is returned if the node is a child
12351235 * of the instance. false if not. Also, if the current instance is a
@@ -1632,7 +1632,7 @@ public function open() : string {
16321632 *
16331633 * @param array $attributes An array that contains extra attributes for the paragraph.
16341634 *
1635- * @param bool $escEntities If set to true, the method will
1635+ * @param bool $esc If set to true, HTML entities will be escaped in text content.Entities If set to true, the method will
16361636 * replace the characters '<', '>' and
16371637 * '&' with the following HTML entities: '&lt;', '&gt;' and '&amp;'
16381638 * in the given text. Default is true.
@@ -1892,7 +1892,7 @@ public function setAttributes(array $attrsArr) : HTMLNode {
18921892 /**
18931893 * Sets the value of the attribute 'class' of the node.
18941894 *
1895- * @param string $val The name of the class.
1895+ * @param string $val The value to search for. The name of the class.
18961896 *
18971897 * @param bool $override If this parameter is set to false and the node
18981898 * has a class already set, the given class name will be appended to the
@@ -1918,7 +1918,7 @@ public function setClassName(string $val, bool $override = true) : HTMLNode {
19181918 *
19191919 * This only applies to text node.
19201920 *
1921- * @param bool $esc
1921+ * @param bool $esc If set to true, HTML entities will be escaped in text content.
19221922 */
19231923 public function setEscapeEntities (bool $ esc ) {
19241924 if ($ this ->isTextNode ()) {
@@ -1979,7 +1979,7 @@ public function setIsVoidNode(bool $bool) {
19791979 /**
19801980 * Sets the value of the attribute 'name' of the node.
19811981 *
1982- * @param string $val The value to set.
1982+ * @param string $val The value to search for. The value to set.
19831983 *
19841984 * @return HTMLNode The method will return the instance that this
19851985 * method is called on.
@@ -2120,7 +2120,7 @@ public function setTabIndex(int $val) : HTMLNode {
21202120 * @param string $text The text to set. If the node is not a text node or
21212121 * a comment node, the value will never be set.
21222122 *
2123- * @param bool $escHtmlEntities If set to true, the method will
2123+ * @param bool $esc If set to true, HTML entities will be escaped in text content.HtmlEntities If set to true, the method will
21242124 * replace the characters '<', '>' and
21252125 * '&' with the following HTML entities: '&lt;', '&gt;' and '&amp;'
21262126 * in the given text. Default is true. Ignored in case the node type is comment.
@@ -2145,7 +2145,7 @@ public function setText(string $text, bool $escHtmlEntities = true) : HTMLNode {
21452145 /**
21462146 * Sets the value of the attribute 'title' of the node.
21472147 *
2148- * @param string $val The value to set. From MDN: Contains a
2148+ * @param string $val The value to search for. The value to set. From MDN: Contains a
21492149 * text representing advisory information related to the element
21502150 * it belongs to. Such information can typically, but not necessarily,
21512151 * be presented to the user as a tooltip.
@@ -2174,7 +2174,7 @@ public function setUseForwardSlash(bool $hasForward) {
21742174 /**
21752175 * Sets the value of the attribute 'dir' of the node.
21762176 *
2177- * @param string $val The value to set. It can be 'ltr' or 'rtl'.
2177+ * @param string $val The value to search for. The value to set. It can be 'ltr' or 'rtl'.
21782178 *
21792179 * @return HTMLNode The method will return the instance that this
21802180 * method is called on.
@@ -2213,7 +2213,7 @@ public function table(array $attributes = []) : HTMLNode {
22132213 *
22142214 * @param string $txt The text that will be in the node.
22152215 *
2216- * @param bool $escEntities If set to true, the method will
2216+ * @param bool $esc If set to true, HTML entities will be escaped in text content.Entities If set to true, the method will
22172217 * replace the characters '<', '>' and
22182218 * '&' with the following HTML entities: '&lt;', '&gt;' and '&amp;'
22192219 * in the given text. Default is true.
@@ -2369,9 +2369,10 @@ private function addTab() {
23692369 $ this ->tabCount += 1 ;
23702370 }
23712371 /**
2372+ * Returns the closing tag of the node as formatted code.
23722373 *
23732374 * @param array $FO Formatting options.
2374- * @return string
2375+ * @return string The closing tag as formatted HTML code.
23752376 *
23762377 */
23772378 private function closeAsCode (array $ FO ) : string {
@@ -2386,8 +2387,8 @@ private function closeAsCode(array $FO) : string {
23862387 }
23872388 /**
23882389 *
2389- * @param string $val
2390- * @param LinkedList $chNodes
2390+ * @param string $val The value to search for.
2391+ * @param LinkedList $chNodes The list of child nodes.
23912392 * @return null|HTMLNode Description
23922393 */
23932394 private function getChildByIDHelper (string $ val , ?LinkedList $ chNodes ) {
@@ -2419,9 +2420,9 @@ private function getChildByIDHelper(string $val, ?LinkedList $chNodes) {
24192420 }
24202421 /**
24212422 *
2422- * @param string $val
2423- * @param LinkedList $chList
2424- * @param LinkedList $list
2423+ * @param string $val The value to search for.
2424+ * @param LinkedList $chList The list of children to search.
2425+ * @param LinkedList $list The list to populate with results.
24252426 * @return LinkedList
24262427 */
24272428 private function getChildrenByTagHelper (string $ val ,LinkedList $ chList , LinkedList $ list ) : LinkedList {
@@ -2490,9 +2491,10 @@ private function nodeFromArrayHelper(array $arr) : HTMLNode {
24902491 return $ node ;
24912492 }
24922493 /**
2494+ * Returns the closing tag of the node as formatted code.
24932495 *
24942496 * @param array $FO Formatting options.
2495- * @return string
2497+ * @return string The closing tag as formatted HTML code.
24962498 *
24972499 */
24982500 private function openAsCode (array $ FO ) : string {
@@ -2563,7 +2565,7 @@ private function popNodeAsCode(array $FO) {
25632565 }
25642566 /**
25652567 *
2566- * @param HTMLNode $node
2568+ * @param HTMLNode $node The HTML node to process.
25672569 */
25682570 private function pushNode (HTMLNode $ node ) {
25692571 if ($ node ->isTextNode ()) {
@@ -2619,7 +2621,7 @@ private function pushNode(HTMLNode $node) {
26192621 }
26202622 }
26212623 /**
2622- * @param HTMLNode $node
2624+ * @param HTMLNode $node The HTML node to process.
26232625 *
26242626 * @param array $FO Formatting options.
26252627 *
0 commit comments