Skip to content

Commit 32778c8

Browse files
committed
Revert "Try abstract class instead of interface"
This reverts commit 74881651faf991eabceb090707ce8b43c2a25316.
1 parent 86eabe0 commit 32778c8

10 files changed

+12
-12
lines changed

src/wp-includes/html-api/class-wp-css-attribute-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class WP_CSS_Attribute_Selector extends WP_CSS_HTML_Tag_Processor_Matcher {
3+
final class WP_CSS_Attribute_Selector implements WP_CSS_HTML_Tag_Processor_Matcher {
44
const WHITESPACE_CHARACTERS = " \t\r\n\f";
55

66
public function matches( WP_HTML_Tag_Processor $processor ): bool {

src/wp-includes/html-api/class-wp-css-class-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class WP_CSS_Class_Selector extends WP_CSS_HTML_Tag_Processor_Matcher {
3+
final class WP_CSS_Class_Selector implements WP_CSS_HTML_Tag_Processor_Matcher {
44
public function matches( WP_HTML_Tag_Processor $processor ): bool {
55
return (bool) $processor->has_class( $this->ident );
66
}

src/wp-includes/html-api/class-wp-css-complex-selector-list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
*
3333
* @access private
3434
*/
35-
class WP_CSS_Complex_Selector_List extends WP_CSS_Compound_Selector_List {
35+
class WP_CSS_Complex_Selector_List extends WP_CSS_Compound_Selector_List implements WP_CSS_HTML_Processor_Matcher {
3636
/**
3737
* Takes a CSS selector string and returns an instance of itself or `null` if the selector
3838
* string is invalid or unsupported.

src/wp-includes/html-api/class-wp-css-complex-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* > <complex-selector> = <compound-selector> [ <combinator>? <compound-selector> ] *
77
*/
8-
final class WP_CSS_Complex_Selector extends WP_CSS_HTML_Processor_Matcher {
8+
final class WP_CSS_Complex_Selector implements WP_CSS_HTML_Processor_Matcher {
99
public function matches( WP_HTML_Processor $processor ): bool {
1010
// First selector must match this location.
1111
if ( ! $this->selectors[0]->matches( $processor ) ) {

src/wp-includes/html-api/class-wp-css-compound-selector-list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
* @link https://www.w3.org/TR/selectors-api2/
7777
* @link https://www.w3.org/TR/selectors-4/
7878
*/
79-
class WP_CSS_Compound_Selector_List extends WP_CSS_HTML_Tag_Processor_Matcher {
79+
class WP_CSS_Compound_Selector_List implements WP_CSS_HTML_Tag_Processor_Matcher {
8080
/**
8181
* @param WP_HTML_Tag_Processor $processor
8282
* @return bool

src/wp-includes/html-api/class-wp-css-compound-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*
66
* > <compound-selector> = [ <type-selector>? <subclass-selector>* ]!
77
*/
8-
final class WP_CSS_Compound_Selector extends WP_CSS_HTML_Tag_Processor_Matcher {
8+
final class WP_CSS_Compound_Selector implements WP_CSS_HTML_Tag_Processor_Matcher {
99
public function matches( WP_HTML_Tag_Processor $processor ): bool {
1010
if ( $this->type_selector ) {
1111
if ( ! $this->type_selector->matches( $processor ) ) {

src/wp-includes/html-api/class-wp-css-id-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class WP_CSS_ID_Selector extends WP_CSS_HTML_Tag_Processor_Matcher {
3+
final class WP_CSS_ID_Selector implements WP_CSS_HTML_Tag_Processor_Matcher {
44
/** @var string */
55
public $ident;
66

src/wp-includes/html-api/class-wp-css-type-selector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
final class WP_CSS_Type_Selector extends WP_CSS_HTML_Tag_Processor_Matcher {
3+
final class WP_CSS_Type_Selector implements WP_CSS_HTML_Tag_Processor_Matcher {
44
public function matches( WP_HTML_Tag_Processor $processor ): bool {
55
$tag_name = $processor->get_tag();
66
if ( null === $tag_name ) {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
abstract class WP_CSS_HTML_Processor_Matcher {
3+
interface WP_CSS_HTML_Processor_Matcher {
44
/**
55
* @return bool
66
*/
7-
abstract public function matches( WP_HTML_Processor $processor ): bool;
7+
public function matches( WP_HTML_Processor $processor ): bool;
88
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
abstract class WP_CSS_HTML_Tag_Processor_Matcher {
3+
interface WP_CSS_HTML_Tag_Processor_Matcher {
44
/**
55
* @return bool
66
*/
7-
abstract public function matches( WP_HTML_Tag_Processor $processor ): bool;
7+
public function matches( WP_HTML_Tag_Processor $processor ): bool;
88
}

0 commit comments

Comments
 (0)