Skip to content

Commit

Permalink
Merge pull request #2363 from WordPress/feature/cs-closures-should-be…
Browse files Browse the repository at this point in the history
…-static
  • Loading branch information
GaryJones authored Aug 19, 2023
2 parents d199361 + 8c81cc6 commit 4e8f340
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ public function process_token( $stackPtr ) {
if ( $stripped_content !== $content ) {
$vars_without_wpdb = array_filter(
TextStrings::getEmbeds( $content ),
function ( $symbol ) {
static function ( $symbol ) {
return preg_match( '`^\{?\$\{?wpdb\??->`', $symbol ) !== 1;
}
);
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Sniffs/DB/PreparedSQLSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public function process_token( $stackPtr ) {

$bad_variables = array_filter(
TextStrings::getEmbeds( $this->tokens[ $this->i ]['content'] ),
function ( $symbol ) {
static function ( $symbol ) {
return preg_match( '`^\{?\$\{?wpdb\??->`', $symbol ) !== 1;
}
);
Expand Down

0 comments on commit 4e8f340

Please sign in to comment.