@@ -30,8 +30,7 @@ discard block |
||
| 30 | 30 | use PHP_CodeSniffer\Sniffs\Sniff; |
| 31 | 31 | use PHP_CodeSniffer\Files\File; |
| 32 | 32 | |
| 33 | -class LogicalOperatorAndSniff implements Sniff |
|
| 34 | -{ |
|
| 33 | +class LogicalOperatorAndSniff implements Sniff { |
|
| 35 | 34 | /** |
| 36 | 35 | * Returns an array of tokens this test wants to listen for: symbolic and literal operators and. |
| 37 | 36 | * |
@@ -63,7 +62,8 @@ discard block |
||
| 63 | 62 | $operator_string = $operator_token['content']; |
| 64 | 63 | $operator_code = $operator_token['code']; |
| 65 | 64 | |
| 66 | - if ($operator_string !== strtoupper($operator_string)) { |
|
| 65 | + if ($operator_string !== strtoupper($operator_string)) |
|
| 66 | + { |
|
| 67 | 67 | $error_message = 'Logical operator should be in upper case;' |
| 68 | 68 | . ' use "' . strtoupper($operator_string) |
| 69 | 69 | . '" instead of "' . $operator_string . '"'; |
@@ -31,8 +31,7 @@ |
||
| 31 | 31 | use PHP_CodeSniffer\Sniffs\Sniff; |
| 32 | 32 | use PHP_CodeSniffer\Files\File; |
| 33 | 33 | |
| 34 | -class StrictComparisonOperatorSniff implements Sniff |
|
| 35 | -{ |
|
| 34 | +class StrictComparisonOperatorSniff implements Sniff { |
|
| 36 | 35 | private static $_replacements = array( |
| 37 | 36 | T_IS_EQUAL => '===', |
| 38 | 37 | T_IS_NOT_EQUAL => '!==', |
@@ -30,8 +30,7 @@ discard block |
||
| 30 | 30 | use PHP_CodeSniffer\Sniffs\Sniff; |
| 31 | 31 | use PHP_CodeSniffer\Files\File; |
| 32 | 32 | |
| 33 | -class UppercaseLogicalOperatorOrSniff implements Sniff |
|
| 34 | -{ |
|
| 33 | +class UppercaseLogicalOperatorOrSniff implements Sniff { |
|
| 35 | 34 | /** |
| 36 | 35 | * Returns an array of tokens this test wants to listen for: literal and symbolic operators or. |
| 37 | 36 | * |
@@ -64,13 +63,15 @@ discard block |
||
| 64 | 63 | $operator_string = $operator_token['content']; |
| 65 | 64 | $operator_code = $operator_token['code']; |
| 66 | 65 | |
| 67 | - if ($operator_code == T_BOOLEAN_OR) { |
|
| 66 | + if ($operator_code == T_BOOLEAN_OR) |
|
| 67 | + { |
|
| 68 | 68 | $error_message = 'Logical operator "' . $operator_string |
| 69 | 69 | . '" is prohibited; use "OR" instead'; |
| 70 | 70 | $phpcsFile->addError($error_message, $stackPtr, 'UseOf||InsteadOfOR'); |
| 71 | 71 | } |
| 72 | 72 | // it is literal, if it is not symbolic |
| 73 | - else if ($operator_string !== strtoupper($operator_string)) { |
|
| 73 | + else if ($operator_string !== strtoupper($operator_string)) |
|
| 74 | + { |
|
| 74 | 75 | $error_message = 'Logical operator should be in upper case;' |
| 75 | 76 | . ' use "' . strtoupper($operator_string) |
| 76 | 77 | . '" instead of "' . $operator_string . '"'; |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | use Aviat\AnimeClient\API\Kitsu as K; |
| 21 | 21 | use Aviat\Ion\Json; |
| 22 | 22 | |
| 23 | -class KitsuRequestBuilder extends APIRequestBuilder { |
|
| 23 | +class KitsuRequestBuilder extends APIRequestBuilder { |
|
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | 26 | * The base url for api requests |