PATH:
opt
/
cpanel
/
ea-wappspector
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
Squiz
/
Tests
/
WhiteSpace
<?php /** * Unit test class for the SuperfluousWhitespace sniff. * * @author Greg Sherwood <gsherwood@squiz.net> * @copyright 2006-2015 Squiz Pty Ltd (ABN 77 084 670 600) * @license https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/licence.txt BSD Licence */ namespace PHP_CodeSniffer\Standards\Squiz\Tests\WhiteSpace; use PHP_CodeSniffer\Tests\Standards\AbstractSniffUnitTest; /** * Unit test class for the SuperfluousWhitespace sniff. * * @covers \PHP_CodeSniffer\Standards\Squiz\Sniffs\WhiteSpace\SuperfluousWhitespaceSniff */ final class SuperfluousWhitespaceUnitTest extends AbstractSniffUnitTest { /** * Returns the lines where errors should occur. * * The key of the array should represent the line number and the value * should represent the number of errors that should occur on that line. * * @param string $testFile The name of the file being tested. * * @return array<int, int> */ public function getErrorList($testFile='') { switch ($testFile) { case 'SuperfluousWhitespaceUnitTest.1.inc': return [ 2 => 1, 4 => 1, 5 => 1, 6 => 1, 7 => 1, 16 => 1, 23 => 1, 28 => 1, 33 => 1, 49 => 1, 62 => 1, 65 => 1, 73 => 1, ]; case 'SuperfluousWhitespaceUnitTest.2.inc': return [ 2 => 1, 8 => 1, ]; case 'SuperfluousWhitespaceUnitTest.3.inc': return [ 6 => 1, 10 => 1, ]; case 'SuperfluousWhitespaceUnitTest.4.inc': case 'SuperfluousWhitespaceUnitTest.5.inc': return [ 1 => 1, 4 => 1, ]; case 'SuperfluousWhitespaceUnitTest.1.js': return [ 1 => 1, 3 => 1, 4 => 1, 5 => 1, 6 => 1, 15 => 1, 22 => 1, 29 => 1, 38 => 1, 56 => 1, ]; case 'SuperfluousWhitespaceUnitTest.1.css': return [ 1 => 1, 8 => 1, 9 => 1, 11 => 1, 32 => 1, ]; default: return []; }//end switch }//end getErrorList() /** * Returns the lines where warnings should occur. * * The key of the array should represent the line number and the value * should represent the number of warnings that should occur on that line. * * @return array<int, int> */ public function getWarningList() { return []; }//end getWarningList() }//end class
[+]
..
[-] SuperfluousWhitespaceUnitTest.3.js.fixed
[edit]
[-] ScopeKeywordSpacingUnitTest.php
[edit]
[-] FunctionSpacingUnitTest.4.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.4.inc
[edit]
[-] FunctionSpacingUnitTest.php
[edit]
[-] FunctionSpacingUnitTest.2.inc
[edit]
[-] OperatorSpacingUnitTest.1.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.3.inc.fixed
[edit]
[-] ScopeKeywordSpacingUnitTest.1.inc.fixed
[edit]
[-] ControlStructureSpacingUnitTest.js
[edit]
[-] FunctionClosingBraceSpaceUnitTest.php
[edit]
[-] LogicalOperatorSpacingUnitTest.inc
[edit]
[-] PropertyLabelSpacingUnitTest.php
[edit]
[-] FunctionOpeningBraceSpaceUnitTest.php
[edit]
[-] PropertyLabelSpacingUnitTest.js.fixed
[edit]
[-] SuperfluousWhitespaceUnitTest.3.js
[edit]
[-] LogicalOperatorSpacingUnitTest.js
[edit]
[-] SuperfluousWhitespaceUnitTest.2.css.fixed
[edit]
[-] ScopeKeywordSpacingUnitTest.1.inc
[edit]
[-] FunctionSpacingUnitTest.2.inc.fixed
[edit]
[-] MemberVarSpacingUnitTest.1.inc.fixed
[edit]
[-] SemicolonSpacingUnitTest.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.1.inc
[edit]
[-] LanguageConstructSpacingUnitTest.inc.fixed
[edit]
[-] SemicolonSpacingUnitTest.js.fixed
[edit]
[-] LanguageConstructSpacingUnitTest.php
[edit]
[-] FunctionClosingBraceSpaceUnitTest.inc.fixed
[edit]
[-] SemicolonSpacingUnitTest.php
[edit]
[-] OperatorSpacingUnitTest.js
[edit]
[-] ObjectOperatorSpacingUnitTest.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.4.inc.fixed
[edit]
[-] ObjectOperatorSpacingUnitTest.inc.fixed
[edit]
[-] LogicalOperatorSpacingUnitTest.inc.fixed
[edit]
[-] ScopeKeywordSpacingUnitTest.4.inc
[edit]
[-] LogicalOperatorSpacingUnitTest.php
[edit]
[-] LogicalOperatorSpacingUnitTest.js.fixed
[edit]
[-] SuperfluousWhitespaceUnitTest.5.inc
[edit]
[-] FunctionSpacingUnitTest.3.inc.fixed
[edit]
[-] FunctionOpeningBraceSpaceUnitTest.js.fixed
[edit]
[-] SuperfluousWhitespaceUnitTest.3.css.fixed
[edit]
[-] FunctionSpacingUnitTest.1.inc.fixed
[edit]
[-] PropertyLabelSpacingUnitTest.js
[edit]
[-] SuperfluousWhitespaceUnitTest.5.inc.fixed
[edit]
[-] SemicolonSpacingUnitTest.inc.fixed
[edit]
[-] MemberVarSpacingUnitTest.php
[edit]
[-] CastSpacingUnitTest.inc.fixed
[edit]
[-] FunctionOpeningBraceSpaceUnitTest.inc.fixed
[edit]
[-] ScopeClosingBraceUnitTest.inc
[edit]
[-] ScopeKeywordSpacingUnitTest.3.inc.fixed
[edit]
[-] SemicolonSpacingUnitTest.js
[edit]
[-] SuperfluousWhitespaceUnitTest.1.js
[edit]
[-] SuperfluousWhitespaceUnitTest.1.css.fixed
[edit]
[-] OperatorSpacingUnitTest.php
[edit]
[-] ScopeClosingBraceUnitTest.inc.fixed
[edit]
[-] OperatorSpacingUnitTest.1.inc.fixed
[edit]
[-] ControlStructureSpacingUnitTest.js.fixed
[edit]
[-] LanguageConstructSpacingUnitTest.inc
[edit]
[-] FunctionClosingBraceSpaceUnitTest.js.fixed
[edit]
[-] FunctionSpacingUnitTest.1.inc
[edit]
[-] MemberVarSpacingUnitTest.2.inc
[edit]
[-] MemberVarSpacingUnitTest.3.inc
[edit]
[-] FunctionClosingBraceSpaceUnitTest.inc
[edit]
[-] FunctionSpacingUnitTest.6.inc
[edit]
[-] FunctionClosingBraceSpaceUnitTest.js
[edit]
[-] ScopeKeywordSpacingUnitTest.3.inc
[edit]
[-] OperatorSpacingUnitTest.3.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.3.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.2.inc.fixed
[edit]
[-] ControlStructureSpacingUnitTest.php
[edit]
[-] ObjectOperatorSpacingUnitTest.php
[edit]
[-] FunctionSpacingUnitTest.5.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.2.inc
[edit]
[-] FunctionSpacingUnitTest.5.inc.fixed
[edit]
[-] SuperfluousWhitespaceUnitTest.1.js.fixed
[edit]
[-] SuperfluousWhitespaceUnitTest.2.js
[edit]
[-] CastSpacingUnitTest.php
[edit]
[-] SuperfluousWhitespaceUnitTest.1.inc.fixed
[edit]
[-] OperatorSpacingUnitTest.js.fixed
[edit]
[-] ControlStructureSpacingUnitTest.inc.fixed
[edit]
[-] FunctionSpacingUnitTest.3.inc
[edit]
[-] FunctionSpacingUnitTest.6.inc.fixed
[edit]
[-] ControlStructureSpacingUnitTest.inc
[edit]
[-] ScopeClosingBraceUnitTest.php
[edit]
[-] FunctionSpacingUnitTest.7.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.2.js.fixed
[edit]
[-] CastSpacingUnitTest.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.3.css
[edit]
[-] SuperfluousWhitespaceUnitTest.2.css
[edit]
[-] FunctionOpeningBraceSpaceUnitTest.js
[edit]
[-] OperatorSpacingUnitTest.2.inc
[edit]
[-] FunctionOpeningBraceSpaceUnitTest.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.php
[edit]
[-] ScopeKeywordSpacingUnitTest.2.inc
[edit]
[-] SuperfluousWhitespaceUnitTest.1.css
[edit]
[-] MemberVarSpacingUnitTest.1.inc
[edit]