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

Various minor doc fixes #766

Merged
merged 1 commit into from
Aug 23, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions WordPressVIPMinimum/Sniffs/Files/IncludingFileSniff.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function process_token( $stackPtr ) {

if ( $this->tokens[ $nextToken ]['code'] === T_STRING ) {
if ( in_array( $this->tokens[ $nextToken ]['content'], $this->getPathFunctions, true ) === true ) {
// The construct is using one of the function for getting correct path which is fine.
// The construct is using one of the functions for getting correct path which is fine.
return;
}

Expand Down Expand Up @@ -192,7 +192,7 @@ public function process_token( $stackPtr ) {
/**
* Check if a content string contains a keyword in custom paths.
*
* @param string $content Content string.
* @param string $content Content string.
*
* @return bool True if the string partially matches a keyword in $allowedCustomKeywords, false otherwise.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use PHP_CodeSniffer\Util\Tokens;

/**
* Checks whether proper escaping function is used.
* Checks whether code tries to refer to a batcache URL parameter.
*
* @package VIPCS\WordPressVIPMinimum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,7 @@
use PHP_CodeSniffer\Util\Tokens;

/**
* This sniff enforces checking the return value of a function before passing it to another one.
*
* An example of a not checking return value is:
*
* <code>
* echo esc_url( wpcom_vip_get_term_link( $term ) );
* </code>
* This sniff check whether a cached value is being overridden.
*
* @package VIPCS\WordPressVIPMinimum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use PHP_CodeSniffer\Util\Tokens;

/**
* Restricts usage of rewrite rules flushing
* Restricts usage of file_get_contents().
*
* @package VIPCS\WordPressVIPMinimum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use WordPressCS\WordPress\AbstractArrayAssignmentRestrictionsSniff;

/**
* Flag REGEXP and NOT REGEXP in meta compare
* Flag use of a timeout of more than 3 seconds for remote requests.
*
* @package VIPCS\WordPressVIPMinimum
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ include_once("http://www.google.com/bad_file.php"); // External URL.
// Allowed keywords
include 'https://path.com/bad_file.php'; // Error - external URL with keyword from $allowedKeywords.
require $path; // Warning - custom variable with keyword from $allowedKeywords.
include_once dir_function(); // Error - custom functionm with keyword from $allowedKeywords.
include_once dir_function(); // Warning - custom function with keyword from $allowedKeywords.
require CUSTOM_CONSTANT_DIR . 'file.php'; // OK.
require_once ( VIPCS_PATH ) . 'file.php'; // OK.
include_once
Expand Down