@@ -110,7 +110,7 @@ public function current_node() {
110110 * @param string[] $termination_list List of elements that terminate the search.
111111 * @return bool Whether the element was found in a specific scope.
112112 */
113- public function has_element_in_specific_scope ( $ tag_name , $ termination_list ) {
113+ public function has_element_in_specific_scope ( $ tag_name , $ termination_list ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
114114 foreach ( $ this ->walk_up () as $ node ) {
115115 if ( $ node ->node_name === $ tag_name ) {
116116 return true ;
@@ -134,6 +134,7 @@ public function has_element_in_scope( $tag_name ) {
134134 return $ this ->has_element_in_specific_scope (
135135 $ tag_name ,
136136 array (
137+
137138 /*
138139 * Because it's not currently possible to encounter
139140 * one of the termination elements, they don't need
@@ -152,11 +153,15 @@ public function has_element_in_scope( $tag_name ) {
152153 *
153154 * @see https://html.spec.whatwg.org/#has-an-element-in-list-item-scope
154155 *
156+ * @throws WP_HTML_Unsupported_Exception Always until this function is implemented.
157+ *
155158 * @param string $tag_name Name of tag to check.
156159 * @return bool Whether given element is in scope.
157160 */
158- public function has_element_in_list_item_scope ( $ tag_name ) {
161+ public function has_element_in_list_item_scope ( $ tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
159162 throw new WP_HTML_Unsupported_Exception ( 'Cannot process elements depending on list item scope. ' );
163+
164+ return false ; // The linter requires this unreachable code until the function is implemented and can return.
160165 }
161166
162167 /**
@@ -173,6 +178,7 @@ public function has_element_in_button_scope( $tag_name ) {
173178 return $ this ->has_element_in_specific_scope (
174179 $ tag_name ,
175180 array (
181+
176182 /*
177183 * Because it's not currently possible to encounter
178184 * one of the termination elements, they don't need
@@ -191,11 +197,15 @@ public function has_element_in_button_scope( $tag_name ) {
191197 *
192198 * @see https://html.spec.whatwg.org/#has-an-element-in-table-scope
193199 *
200+ * @throws WP_HTML_Unsupported_Exception Always until this function is implemented.
201+ *
194202 * @param string $tag_name Name of tag to check.
195203 * @return bool Whether given element is in scope.
196204 */
197- public function has_element_in_table_scope ( $ tag_name ) {
205+ public function has_element_in_table_scope ( $ tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
198206 throw new WP_HTML_Unsupported_Exception ( 'Cannot process elements depending on table scope. ' );
207+
208+ return false ; // The linter requires this unreachable code until the function is implemented and can return.
199209 }
200210
201211 /**
@@ -205,11 +215,15 @@ public function has_element_in_table_scope( $tag_name ) {
205215 *
206216 * @see https://html.spec.whatwg.org/#has-an-element-in-select-scope
207217 *
218+ * @throws WP_HTML_Unsupported_Exception Always until this function is implemented.
219+ *
208220 * @param string $tag_name Name of tag to check.
209221 * @return bool Whether given element is in scope.
210222 */
211- public function has_element_in_select_scope ( $ tag_name ) {
223+ public function has_element_in_select_scope ( $ tag_name ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
212224 throw new WP_HTML_Unsupported_Exception ( 'Cannot process elements depending on select scope. ' );
225+
226+ return false ; // The linter requires this unreachable code until the function is implemented and can return.
213227 }
214228
215229 /**
@@ -219,7 +233,7 @@ public function has_element_in_select_scope( $tag_name ) {
219233 *
220234 * @see https://html.spec.whatwg.org/#has-an-element-in-button-scope
221235 *
222- * @return bool
236+ * @return bool Whether a P is in BUTTON scope.
223237 */
224238 public function has_p_in_button_scope () {
225239 return $ this ->has_p_in_button_scope ;
@@ -320,7 +334,7 @@ public function remove_node( $token ) {
320334 * > EM -> STRONG -> A ->
321335 *
322336 * To start with the most-recently added element and walk towards the top,
323- * @see WP_HTML_Open_Elements::walk_up
337+ * { @see WP_HTML_Open_Elements::walk_up}.
324338 *
325339 * @since 6.4.0
326340 */
@@ -347,7 +361,7 @@ public function walk_down() {
347361 * > A -> STRONG -> EM ->
348362 *
349363 * To start with the first added element and walk towards the bottom,
350- * @see WP_HTML_Open_Elements::walk_down
364+ * { @see WP_HTML_Open_Elements::walk_down}.
351365 *
352366 * @since 6.4.0
353367 */
0 commit comments