Skip to content

Commit 7a6debc

Browse files
westonruterdmsnell
andcommitted
Remove redundant anonymous class instantiation
Co-authored-by: dmsnell <[email protected]>
1 parent 6b11f45 commit 7a6debc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plugins/optimization-detective/class-od-html-tag-processor.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ final class OD_HTML_Tag_Processor {
180180
*/
181181
public function __construct( string $html ) {
182182

183-
$processor = new class( $html ) extends WP_HTML_Tag_Processor {
183+
$this->processor = new class( $html ) extends WP_HTML_Tag_Processor {
184184

185185
/**
186186
* Appends HTML to the provided bookmark.
@@ -202,8 +202,6 @@ public function append_html( string $bookmark, string $html ): bool {
202202
return true;
203203
}
204204
};
205-
206-
$this->processor = new $processor( $html );
207205
}
208206

209207
/**

0 commit comments

Comments
 (0)