Skip to content

Commit d0717e7

Browse files
authored
Merge pull request #1647 from WordPress-Coding-Standards/feature/prefix-all-globals-improve-msg-clarity
PrefixAllGlobals: improve error message clarity
2 parents d462b85 + 76011f6 commit d0717e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ public function process_token( $stackPtr ) {
367367
return;
368368
}
369369

370-
$error_text = 'Functions declared';
370+
$error_text = 'Functions declared in the global namespace';
371371
$error_code = 'NonPrefixedFunctionFound';
372372
break;
373373

@@ -555,7 +555,7 @@ protected function process_variable_variable( $stackPtr ) {
555555
$stackPtr,
556556
'NonPrefixedVariableFound',
557557
array(
558-
'Variables defined',
558+
'Global variables defined',
559559
$variable_name,
560560
)
561561
);
@@ -705,7 +705,7 @@ protected function process_variable_assignment( $stackPtr ) {
705705
$is_error,
706706
'NonPrefixedVariableFound',
707707
array(
708-
'Variables defined',
708+
'Global variables defined',
709709
'$' . $variable_name,
710710
)
711711
);

0 commit comments

Comments
 (0)