File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -638,13 +638,15 @@ public function get_unsupported_exception() {
638638 /**
639639 * Use a selector to advance.
640640 *
641+ * @todo _doing_it_wrong on null selector?
642+ *
641643 * @param string $selectors
642- * @return Generator<void>|null
644+ * @return Generator<void>
643645 */
644646 public function select_all ( string $ selectors ): ?Generator {
645647 $ select = WP_CSS_Selector::from_selectors ( $ selectors );
646648 if ( null === $ select ) {
647- return null ;
649+ return ;
648650 }
649651
650652 while ( $ this ->next_tag () ) {
@@ -660,13 +662,10 @@ public function select_all( string $selectors ): ?Generator {
660662 * If iterating through matching elements, use `select_all` instead.
661663 *
662664 * @param string $selectors
663- * @return bool|null
665+ * @return bool
664666 */
665667 public function select ( string $ selectors ) {
666668 $ selection = $ this ->select_all ( $ selectors );
667- if ( null === $ selection ) {
668- return null ;
669- }
670669 foreach ( $ selection as $ _ ) {
671670 return true ;
672671 }
You can’t perform that action at this time.
0 commit comments