Skip to content

Commit

Permalink
Merge pull request #778 from Automattic/3.0/feature/minor-cs-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryJones authored Aug 24, 2023
2 parents a7006ed + abca2e6 commit 9b5c899
Show file tree
Hide file tree
Showing 20 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Constants;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Restricts usage of some constants.
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\Files;

use WordPressCS\WordPress\AbstractFunctionRestrictionsSniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressCS\WordPress\AbstractFunctionRestrictionsSniff;

/**
* WordPressVIPMinimum_Sniffs_Files_IncludingFileSniff.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

namespace WordPressVIPMinimum\Sniffs\Files;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use PHPCSUtils\BackCompat\BCFile;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Ensure that non-PHP files are included via `file_get_contents()` instead of using `include/require[_once]`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\Functions;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* This sniff enforces checking the return value of a function before passing it to another one.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\Functions;

use WordPressCS\WordPress\AbstractFunctionRestrictionsSniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressCS\WordPress\AbstractFunctionRestrictionsSniff;

/**
* Restricts usage of some functions in VIP context.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_DangerouslySetInnerHTMLSniff.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_HTMLExecutingFunctions.
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/Sniffs/JS/InnerHTMLSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_InnerHTMLSniff.
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/Sniffs/JS/StringConcatSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_StringConcatSniff.
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/Sniffs/JS/StrippingTagsSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_StrippingTagsSniff.
Expand Down
2 changes: 1 addition & 1 deletion WordPressVIPMinimum/Sniffs/JS/WindowSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\JS;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* WordPressVIPMinimum_Sniffs_JS_WindowSniff.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

namespace WordPressVIPMinimum\Sniffs\Performance;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* This sniff check whether a cached value is being overridden.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Performance;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Restricts usage of file_get_contents().
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Performance;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Restricts the implementation of taxonomy term meta via options.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Performance;

use WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff;

/**
* Flag suspicious WP_Query and get_posts params.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Security;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Flag functions that don't return anything, yet are wrapped in an escaping function call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Security;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Require `exit;` being called after wp_redirect and wp_safe_redirect.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

namespace WordPressVIPMinimum\Sniffs\Security;

use WordPressVIPMinimum\Sniffs\Sniff;
use PHP_CodeSniffer\Util\Tokens;
use WordPressVIPMinimum\Sniffs\Sniff;

/**
* Restricts usage of str_replace with all 3 params being static.
Expand Down
4 changes: 3 additions & 1 deletion WordPressVIPMinimum/Sniffs/Sniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

namespace WordPressVIPMinimum\Sniffs;

use WordPressCS\WordPress\Sniff as WPCS_Sniff;

/**
* Represents a WordPress\Sniff for sniffing VIP coding standards.
*
* Provides a bootstrap for the sniffs, to reduce code duplication.
*
* @package VIPCS\WordPressVIPMinimum
*/
abstract class Sniff extends \WordPressCS\WordPress\Sniff {
abstract class Sniff extends WPCS_Sniff {
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

namespace WordPressVIPMinimum\Sniffs\UserExperience;

use PHP_CodeSniffer\Util\Tokens;
use PHPCSUtils\Utils\GetTokensAsString;
use PHPCSUtils\Utils\TextStrings;
use WordPressCS\WordPress\AbstractFunctionParameterSniff;
use PHP_CodeSniffer\Util\Tokens;

/**
* Discourages removal of the admin bar.
Expand Down

0 comments on commit 9b5c899

Please sign in to comment.