Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Public Member Functions | |
register () | |
process (File $phpcsFile, $stackPtr) | |
Protected Member Functions | |
findIdentical ($leftCurrentPosition, $rightCurrentPosition) | |
findFunctionParenthesisCloser ($currentPosition) | |
Protected Attributes | |
$errorMessage = 'Identical operator === is not used for testing the return value of %s function' | |
$errorCode = 'ImproperValueTesting' | |
$functions | |
$tokens = [] | |
$file | |
$leftLimit | |
$rightLimit | |
$leftRangeTokens | |
$rightRangeTokens | |
$identical | |
Detects misusing of IS_IDENTICAL operators when strpos
and stripos
functions are used in a condition.
Examples: if (!strpos($haystack, $needle)) {} if (stripos($haystack, $needle) == false) {}
Definition at line 18 of file StringPositionSniff.php.
|
protected |
Finds the position of close parenthesis of detected function.
int | $currentPosition |
Definition at line 163 of file StringPositionSniff.php.
|
protected |
Recursively finds identical operators in current scope.
int | $leftCurrentPosition | |
int | $rightCurrentPosition |
Definition at line 142 of file StringPositionSniff.php.
process | ( | File | $phpcsFile, |
$stackPtr | |||
) |
{}
Definition at line 119 of file StringPositionSniff.php.
register | ( | ) |
|
protected |
Definition at line 32 of file StringPositionSniff.php.
|
protected |
Definition at line 25 of file StringPositionSniff.php.
|
protected |
Definition at line 56 of file StringPositionSniff.php.
|
protected |
Definition at line 39 of file StringPositionSniff.php.
|
protected |
Definition at line 103 of file StringPositionSniff.php.
|
protected |
Definition at line 63 of file StringPositionSniff.php.
|
protected |
Definition at line 77 of file StringPositionSniff.php.
|
protected |
Definition at line 70 of file StringPositionSniff.php.
|
protected |
Definition at line 90 of file StringPositionSniff.php.
|
protected |
Definition at line 49 of file StringPositionSniff.php.