diff --git a/PMAStandard/Sniffs/Files/SpacesAroundConcatSniff.php b/PMAStandard/Sniffs/Files/SpacesAroundConcatSniff.php new file mode 100644 index 0000000000..c847a60fca --- /dev/null +++ b/PMAStandard/Sniffs/Files/SpacesAroundConcatSniff.php @@ -0,0 +1,80 @@ +getTokens(); + if ($tokens[$stackPtr-1]['type'] !== 'T_WHITESPACE') { + $warning = 'Whitespace is expected before any concat operator "."'; + $phpcsFile->addWarning($warning, $stackPtr, 'Found'); + } + if ($tokens[$stackPtr+1]['type'] !== 'T_WHITESPACE') { + $warning = 'Whitespace is expected after any concat operator "."'; + $phpcsFile->addWarning($warning, $stackPtr, 'Found'); + } + }//end process() + + // }}} + +}//end class + +// }}} + +?> diff --git a/test/libraries/PMA_server_privileges_test.php b/test/libraries/PMA_server_privileges_test.php index 2d14684b45..f9fd822a8f 100644 --- a/test/libraries/PMA_server_privileges_test.php +++ b/test/libraries/PMA_server_privileges_test.php @@ -856,7 +856,8 @@ class PMA_ServerPrivileges_Test extends PHPUnit_Framework_TestCase //validate 3: PMA_getHtmlForGlobalOrDbSpecificPrivs $this->assertContains( - '
', + '
', $html ); $this->assertContains(