for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* CodingStandard_Tests_Formatting_SpaceOperatorUnitTest.
*
* PHP version 5
* @category PHP
* @package PHP_CodeSniffer
* @author Alexander Obuhovich <[email protected]>
* @license https://github.com/aik099/CodingStandard/blob/master/LICENSE BSD 3-Clause
* @link https://github.com/aik099/CodingStandard
*/
namespace CodingStandard\Tests\Formatting;
use TestSuite\AbstractSniffUnitTest;
* Unit test class for the SpaceOperator sniff.
class SpaceOperatorUnitTest 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 Name of the file with test data.
* @return array(int => int)
public function getErrorList($testFile)
return array(
// The "=" operator.
2 => 1,
// The "&=" operator.
3 => 1,
// The ".=" operator.
4 => 1,
// The "/=" operator.
5 => 1,
// The "-=" operator.
6 => 1,
// The "%=" operator.
7 => 1,
// The "*=" operator.
8 => 1,
// The "+=" operator.
9 => 1,
// The "^=" operator.
10 => 1,
// The "=>" operator.
11 => 1,
// The "=" on a new line.
23 => 1,
);
}//end getErrorList()
* Returns the lines where warnings should occur.
* should represent the number of warnings that should occur on that line.
public function getWarningList($testFile)
return array();
}//end getWarningList()
}//end class