@@ -1,15 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace MyProject; |
| 3 | 3 | |
| 4 | -use BarClass as Bar; |
|
| 5 | -use My\Full\Classname as Another; |
|
| 6 | - |
|
| 7 | - |
|
| 8 | -use Something; |
|
| 9 | -use SomethingElse; |
|
| 10 | - |
|
| 11 | 4 | // Comment here. |
| 12 | -use LastThing; |
|
| 13 | 5 | |
| 14 | 6 | class Foo { |
| 15 | 7 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | } |
| 16 | 16 | |
| 17 | 17 | $var = new MyClass( |
| 18 | - function () use ($foo, $bar) { |
|
| 18 | + function() use ($foo, $bar) { |
|
| 19 | 19 | return true; |
| 20 | 20 | } |
| 21 | 21 | ); |
@@ -1,14 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace MyProject; |
| 3 | 3 | |
| 4 | -use BarClass as Bar; |
|
| 5 | -use My\Full\Classname as Another, My\Full\NSname; |
|
| 6 | - |
|
| 7 | 4 | |
| 8 | 5 | namespace AnotherProject; |
| 9 | 6 | |
| 10 | -use ArrayObject; |
|
| 11 | - |
|
| 12 | 7 | |
| 13 | 8 | $foo = 'bar'; |
| 14 | 9 | |
@@ -1,9 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | namespace bug; |
| 3 | 3 | |
| 4 | -use |
|
| 5 | - someNS\A; |
|
| 6 | -use someNS\B; |
|
| 7 | 4 | class Bug |
| 8 | 5 | { |
| 9 | 6 | public function __construct() |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | public function __construct() |
| 10 | 10 | { |
| 11 | 11 | $b = 1; |
| 12 | - $a = function () use ($b) { |
|
| 12 | + $a = function() use ($b) { |
|
| 13 | 13 | echo $b; |
| 14 | 14 | }; |
| 15 | 15 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | /** |
| 40 | 40 | * Returns the token types that this sniff is interested in. |
| 41 | 41 | * |
| 42 | - * @return int[] |
|
| 42 | + * @return integer[] |
|
| 43 | 43 | */ |
| 44 | 44 | public function register() |
| 45 | 45 | { |
@@ -70,9 +70,9 @@ |
||
| 70 | 70 | } |
| 71 | 71 | |
| 72 | 72 | $find = array( |
| 73 | - T_CLOSE_CURLY_BRACKET, |
|
| 74 | - T_COMMENT, |
|
| 75 | - T_OPEN_TAG, |
|
| 73 | + T_CLOSE_CURLY_BRACKET, |
|
| 74 | + T_COMMENT, |
|
| 75 | + T_OPEN_TAG, |
|
| 76 | 76 | ); |
| 77 | 77 | |
| 78 | 78 | while ($next !== false) { |
@@ -55,7 +55,7 @@ |
||
| 55 | 55 | /** |
| 56 | 56 | * Returns the token types that this sniff is interested in. |
| 57 | 57 | * |
| 58 | - * @return int[] |
|
| 58 | + * @return string[] |
|
| 59 | 59 | */ |
| 60 | 60 | public function register() |
| 61 | 61 | { |
@@ -44,11 +44,11 @@ discard block |
||
| 44 | 44 | * @var array |
| 45 | 45 | */ |
| 46 | 46 | public $excludeStyles = array( |
| 47 | - 'background-position' => 'background-position', |
|
| 48 | - 'box-shadow' => 'box-shadow', |
|
| 49 | - 'transform-origin' => 'transform-origin', |
|
| 50 | - '-webkit-transform-origin' => '-webkit-transform-origin', |
|
| 51 | - '-ms-transform-origin' => '-ms-transform-origin', |
|
| 47 | + 'background-position' => 'background-position', |
|
| 48 | + 'box-shadow' => 'box-shadow', |
|
| 49 | + 'transform-origin' => 'transform-origin', |
|
| 50 | + '-webkit-transform-origin' => '-webkit-transform-origin', |
|
| 51 | + '-ms-transform-origin' => '-ms-transform-origin', |
|
| 52 | 52 | ); |
| 53 | 53 | |
| 54 | 54 | |
@@ -165,9 +165,9 @@ discard block |
||
| 165 | 165 | |
| 166 | 166 | $error = 'Size definitions must use shorthand if available; expected "%s" but found "%s"'; |
| 167 | 167 | $data = array( |
| 168 | - $expected, |
|
| 169 | - $content, |
|
| 170 | - ); |
|
| 168 | + $expected, |
|
| 169 | + $content, |
|
| 170 | + ); |
|
| 171 | 171 | |
| 172 | 172 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'NotUsed', $data); |
| 173 | 173 | if ($fix === true) { |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | /** |
| 40 | 40 | * Returns the token types that this sniff is interested in. |
| 41 | 41 | * |
| 42 | - * @return int[] |
|
| 42 | + * @return integer[] |
|
| 43 | 43 | */ |
| 44 | 44 | public function register() |
| 45 | 45 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | * @param int $stackPtr The position in the stack where |
| 56 | 56 | * the token was found. |
| 57 | 57 | * |
| 58 | - * @return void |
|
| 58 | + * @return null|integer |
|
| 59 | 59 | * @throws PHP_CodeSniffer_Exception If jslint.js could not be run |
| 60 | 60 | */ |
| 61 | 61 | public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | /** |
| 42 | 42 | * Returns an array of tokens this test wants to listen for. |
| 43 | 43 | * |
| 44 | - * @return array |
|
| 44 | + * @return integer[] |
|
| 45 | 45 | */ |
| 46 | 46 | public function register() |
| 47 | 47 | { |
@@ -109,9 +109,9 @@ discard block |
||
| 109 | 109 | |
| 110 | 110 | $error .= ' after function; %s found'; |
| 111 | 111 | $data = array( |
| 112 | - $this->spacing, |
|
| 113 | - $foundLines, |
|
| 114 | - ); |
|
| 112 | + $this->spacing, |
|
| 113 | + $foundLines, |
|
| 114 | + ); |
|
| 115 | 115 | |
| 116 | 116 | $fix = $phpcsFile->addFixableError($error, $closer, 'After', $data); |
| 117 | 117 | if ($fix === true) { |
@@ -202,9 +202,9 @@ discard block |
||
| 202 | 202 | |
| 203 | 203 | $error .= ' before function; %s found'; |
| 204 | 204 | $data = array( |
| 205 | - $this->spacing, |
|
| 206 | - $foundLines, |
|
| 207 | - ); |
|
| 205 | + $this->spacing, |
|
| 206 | + $foundLines, |
|
| 207 | + ); |
|
| 208 | 208 | |
| 209 | 209 | $fix = $phpcsFile->addFixableError($error, $stackPtr, 'Before', $data); |
| 210 | 210 | if ($fix === true) { |
@@ -61,9 +61,6 @@ |
||
| 61 | 61 | * - three |
| 62 | 62 | * |
| 63 | 63 | * @param array &$tokens The array of tokens to process. |
| 64 | - * @param object $tokenizer The tokenizer being used to |
|
| 65 | - * process this file. |
|
| 66 | - * @param string $eolChar The EOL character to use for splitting strings. |
|
| 67 | 64 | * |
| 68 | 65 | * @return void |
| 69 | 66 | */ |
@@ -14,29 +14,29 @@ discard block |
||
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | /** |
| 17 | - * Some info about the class here |
|
| 18 | - * |
|
| 19 | - */ |
|
| 17 | + * Some info about the class here |
|
| 18 | + * |
|
| 19 | + */ |
|
| 20 | 20 | class MyClass |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - *Some info about the function here. |
|
| 24 | - * |
|
| 25 | - * @return void |
|
| 26 | - */ |
|
| 23 | + *Some info about the function here. |
|
| 24 | + * |
|
| 25 | + * @return void |
|
| 26 | + */ |
|
| 27 | 27 | function myFunction() {} |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | /** |
| 31 | 31 | * Some info about the class here |
| 32 | - * |
|
| 32 | + * |
|
| 33 | 33 | */ |
| 34 | 34 | class MyClass |
| 35 | 35 | { |
| 36 | 36 | /** |
| 37 | 37 | * Some info about the function here. |
| 38 | - * |
|
| 39 | - * @return void |
|
| 38 | + * |
|
| 39 | + * @return void |
|
| 40 | 40 | */ |
| 41 | 41 | function myFunction() {} |
| 42 | 42 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | echo 'hi'; |
| 50 | 50 | /** |
| 51 | 51 | Comment here. |
| 52 | - */ |
|
| 52 | + */ |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | * |
| 38 | 38 | * @param string $testFile The name of the file being tested. |
| 39 | 39 | * |
| 40 | - * @return array |
|
| 40 | + * @return string[] |
|
| 41 | 41 | */ |
| 42 | 42 | public function getCliValues($testFile) |
| 43 | 43 | { |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | 48 => 1, |
| 58 | 58 | 70 => 1, |
| 59 | 59 | 71 => 1, |
| 60 | - ); |
|
| 60 | + ); |
|
| 61 | 61 | |
| 62 | 62 | }//end getErrorList() |
| 63 | 63 | |