Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update prefixes #2470

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@
$this->prefixes = RulesetPropertyHelper::merge_custom_array( $this->prefixes, array(), false );
if ( empty( $this->prefixes ) ) {
// No prefixes passed, nothing to do.
return;
// return;
}

$this->validate_prefixes();
if ( empty( $this->validated_prefixes ) ) {
// No _valid_ prefixes passed, nothing to do.
return;
// return;
}

// Ignore test classes.
Expand Down Expand Up @@ -578,6 +578,8 @@
}
}

var_dump( $namespace_name );

Check warning on line 581 in WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

View workflow job for this annotation

GitHub Actions / Run code sniffs

Found precision alignment of 2 spaces.

Check warning on line 581 in WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

View workflow job for this annotation

GitHub Actions / Run code sniffs

var_dump() found. Debug code should not normally be used in production.

// Still here ? In that case, we have a non-prefixed namespace name.
$recorded = $this->phpcsFile->addError(
self::ERROR_MSG,
Expand Down Expand Up @@ -732,6 +734,8 @@
return;
}

var_dump( $item_name );

Check warning on line 737 in WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

View workflow job for this annotation

GitHub Actions / Run code sniffs

Found precision alignment of 2 spaces.

Check warning on line 737 in WordPress/Sniffs/NamingConventions/PrefixAllGlobalsSniff.php

View workflow job for this annotation

GitHub Actions / Run code sniffs

var_dump() found. Debug code should not normally be used in production.

$recorded = $this->phpcsFile->addError(
self::ERROR_MSG,
$stackPtr,
Expand Down
Loading