Skip to content

Commit a55e3e0

Browse files
committed
Sniff::is_use_of_global_constant(): implement is_token_namespaced()
1 parent e5c6ecb commit a55e3e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

WordPress/Sniff.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2726,10 +2726,7 @@ public function is_use_of_global_constant( $stackPtr ) {
27262726
return false;
27272727
}
27282728

2729-
if ( false !== $prev
2730-
&& \T_NS_SEPARATOR === $this->tokens[ $prev ]['code']
2731-
&& \T_STRING === $this->tokens[ ( $prev - 1 ) ]['code']
2732-
) {
2729+
if ( $this->is_token_namespaced( $stackPtr ) === true ) {
27332730
// Namespaced constant of the same name.
27342731
return false;
27352732
}

0 commit comments

Comments
 (0)