Skip to content

Commit d79af5e

Browse files
rodrigoprimojrfnl
andcommitted
Apply suggestions from code review
Co-authored-by: Juliette <[email protected]>
1 parent a5668d4 commit d79af5e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

WordPress/AbstractClassRestrictionsSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function is_targetted_token( $stackPtr ) {
128128
if ( false === $nextNonEmpty
129129
|| \in_array( $this->tokens[ $nextNonEmpty ]['code'], array( \T_READONLY, \T_ANON_CLASS, \T_ATTRIBUTE ), true )
130130
) {
131-
// Live coding or anonymous class (bow out for anonymous classes as they don't have a name).
131+
// Live coding or anonymous class. Bow out.
132132
return false;
133133
}
134134

WordPress/Tests/DB/RestrictedClassesUnitTest.1.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,6 @@ $anon = new readonly class {
112112
public function PDO() {} // OK.
113113
};
114114

115-
$anon = new readonly class extends PDOStatement {}; // Error.
115+
$anon = new readonly class() extends PDOStatement {}; // Error.
116116

117117
$anon = new #[MyAttribute] readonly class {};

0 commit comments

Comments
 (0)