@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * Returns an array of tokens this test wants to listen for. |
35 | 35 | * |
36 | - * @return array |
|
36 | + * @return string[] |
|
37 | 37 | */ |
38 | 38 | public function register() |
39 | 39 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * Processes this test, when one of its tokens is encountered. |
47 | 47 | * |
48 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
48 | + * @param File $phpcsFile The file being scanned. |
|
49 | 49 | * @param int $stackPtr The position of the current token |
50 | 50 | * in the stack passed in $tokens. |
51 | 51 | * |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * Returns an array of tokens this test wants to listen for. |
49 | 49 | * |
50 | - * @return array |
|
50 | + * @return string[] |
|
51 | 51 | */ |
52 | 52 | public function register() |
53 | 53 | { |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * Processes this sniff, when one of its tokens is encountered. |
64 | 64 | * |
65 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
65 | + * @param File $phpcsFile The file being scanned. |
|
66 | 66 | * @param int $stackPtr The position of the current token |
67 | 67 | * in the stack passed in $tokens. |
68 | 68 | * |
@@ -35,9 +35,9 @@ discard block |
||
35 | 35 | * @var array |
36 | 36 | */ |
37 | 37 | public $supportedTokenizers = array( |
38 | - 'PHP', |
|
39 | - 'JS', |
|
40 | - ); |
|
38 | + 'PHP', |
|
39 | + 'JS', |
|
40 | + ); |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * If true, an error will be thrown; otherwise a warning. |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | return array( |
68 | 68 | T_STRING_CONCAT, |
69 | 69 | T_PLUS, |
70 | - ); |
|
70 | + ); |
|
71 | 71 | |
72 | 72 | }//end register() |
73 | 73 |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * Returns an array of tokens this test wants to listen for. |
35 | 35 | * |
36 | - * @return array |
|
36 | + * @return integer[] |
|
37 | 37 | */ |
38 | 38 | public function register() |
39 | 39 | { |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * Processes this test, when one of its tokens is encountered. |
47 | 47 | * |
48 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
48 | + * @param File $phpcsFile The file being scanned. |
|
49 | 49 | * @param int $stackPtr The position of the current token |
50 | 50 | * in the stack passed in $tokens. |
51 | 51 | * |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | * @var array |
39 | 39 | */ |
40 | 40 | protected $properties = array( |
41 | - 'svn:keywords' => 'Author Id Revision', |
|
42 | - 'svn:eol-style' => 'native', |
|
41 | + 'svn:keywords' => 'Author Id Revision', |
|
42 | + 'svn:eol-style' => 'native', |
|
43 | 43 | ); |
44 | 44 | |
45 | 45 | |
@@ -89,9 +89,9 @@ discard block |
||
89 | 89 | ) { |
90 | 90 | $error = 'Unexpected Subversion property "%s" = "%s"'; |
91 | 91 | $data = array( |
92 | - $key, |
|
93 | - $properties[$key], |
|
94 | - ); |
|
92 | + $key, |
|
93 | + $properties[$key], |
|
94 | + ); |
|
95 | 95 | $phpcsFile->addError($error, $stackPtr, 'Unexpected', $data); |
96 | 96 | continue; |
97 | 97 | } |
@@ -101,9 +101,9 @@ discard block |
||
101 | 101 | ) { |
102 | 102 | $error = 'Missing Subversion property "%s" = "%s"'; |
103 | 103 | $data = array( |
104 | - $key, |
|
105 | - $this->properties[$key], |
|
106 | - ); |
|
104 | + $key, |
|
105 | + $this->properties[$key], |
|
106 | + ); |
|
107 | 107 | $phpcsFile->addError($error, $stackPtr, 'Missing', $data); |
108 | 108 | continue; |
109 | 109 | } |
@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | ) { |
114 | 114 | $error = 'Subversion property "%s" = "%s" does not match "%s"'; |
115 | 115 | $data = array( |
116 | - $key, |
|
117 | - $properties[$key], |
|
118 | - $this->properties[$key], |
|
119 | - ); |
|
116 | + $key, |
|
117 | + $properties[$key], |
|
118 | + $this->properties[$key], |
|
119 | + ); |
|
120 | 120 | $phpcsFile->addError($error, $stackPtr, 'NoMatch', $data); |
121 | 121 | } |
122 | 122 | }//end foreach |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | /** |
38 | 38 | * Returns an array of tokens this test wants to listen for. |
39 | 39 | * |
40 | - * @return array |
|
40 | + * @return integer[] |
|
41 | 41 | */ |
42 | 42 | public function register() |
43 | 43 | { |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | /** |
50 | 50 | * Processes this test, when one of its tokens is encountered. |
51 | 51 | * |
52 | - * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document. |
|
52 | + * @param File $phpcsFile All the tokens found in the document. |
|
53 | 53 | * @param int $stackPtr The position of the current token in |
54 | 54 | * the stack passed in $tokens. |
55 | 55 | * |
56 | - * @return void |
|
56 | + * @return integer |
|
57 | 57 | */ |
58 | 58 | public function process(File $phpcsFile, $stackPtr) |
59 | 59 | { |
@@ -36,10 +36,10 @@ discard block |
||
36 | 36 | * @var array |
37 | 37 | */ |
38 | 38 | public $supportedTokenizers = array( |
39 | - 'PHP', |
|
40 | - 'JS', |
|
41 | - 'CSS', |
|
42 | - ); |
|
39 | + 'PHP', |
|
40 | + 'JS', |
|
41 | + 'CSS', |
|
42 | + ); |
|
43 | 43 | |
44 | 44 | |
45 | 45 | /** |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | T_INLINE_HTML => true, |
75 | 75 | T_DOC_COMMENT_WHITESPACE => true, |
76 | 76 | T_DOC_COMMENT_STRING => true, |
77 | - ); |
|
77 | + ); |
|
78 | 78 | |
79 | 79 | for ($i = ($stackPtr + 1); $i < $phpcsFile->numTokens; $i++) { |
80 | 80 | if (isset($checkTokens[$tokens[$i]['code']]) === false) { |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | /** |
103 | 103 | * Returns an array of tokens this test wants to listen for. |
104 | 104 | * |
105 | - * @return array |
|
105 | + * @return integer[] |
|
106 | 106 | */ |
107 | 107 | public function register() |
108 | 108 | { |
@@ -118,11 +118,11 @@ discard block |
||
118 | 118 | /** |
119 | 119 | * Processes this test, when one of its tokens is encountered. |
120 | 120 | * |
121 | - * @param PHP_CodeSniffer_File $phpcsFile All the tokens found in the document. |
|
121 | + * @param File $phpcsFile All the tokens found in the document. |
|
122 | 122 | * @param int $stackPtr The position of the current token |
123 | 123 | * in the stack passed in $tokens. |
124 | 124 | * |
125 | - * @return void |
|
125 | + * @return integer |
|
126 | 126 | */ |
127 | 127 | public function process(File $phpcsFile, $stackPtr) |
128 | 128 | { |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | * @var array |
39 | 39 | */ |
40 | 40 | public $supportedTokenizers = array( |
41 | - 'PHP', |
|
42 | - 'JS', |
|
43 | - ); |
|
41 | + 'PHP', |
|
42 | + 'JS', |
|
43 | + ); |
|
44 | 44 | |
45 | 45 | /** |
46 | 46 | * The number of spaces code should be indented. |
@@ -810,15 +810,15 @@ discard block |
||
810 | 810 | if ($this->tabIndent === true) { |
811 | 811 | $error .= '%s tabs, found %s'; |
812 | 812 | $data = array( |
813 | - floor($checkIndent / $this->_tabWidth), |
|
814 | - floor($tokenIndent / $this->_tabWidth), |
|
815 | - ); |
|
813 | + floor($checkIndent / $this->_tabWidth), |
|
814 | + floor($tokenIndent / $this->_tabWidth), |
|
815 | + ); |
|
816 | 816 | } else { |
817 | 817 | $error .= '%s spaces, found %s'; |
818 | 818 | $data = array( |
819 | - $checkIndent, |
|
820 | - $tokenIndent, |
|
821 | - ); |
|
819 | + $checkIndent, |
|
820 | + $tokenIndent, |
|
821 | + ); |
|
822 | 822 | } |
823 | 823 | |
824 | 824 | if ($this->_debug === true) { |
@@ -35,7 +35,7 @@ |
||
35 | 35 | /** |
36 | 36 | * Should this test be skipped for some reason. |
37 | 37 | * |
38 | - * @return void |
|
38 | + * @return boolean |
|
39 | 39 | */ |
40 | 40 | protected function shouldSkipTest() |
41 | 41 | { |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | /** |
21 | 21 | * Returns an array of tokens this test wants to listen for. |
22 | 22 | * |
23 | - * @return array |
|
23 | + * @return integer[] |
|
24 | 24 | */ |
25 | 25 | public function register() |
26 | 26 | { |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Processes this sniff, when one of its tokens is encountered. |
34 | 34 | * |
35 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
35 | + * @param File $phpcsFile The file being scanned. |
|
36 | 36 | * @param int $stackPtr The position of the current token in |
37 | 37 | * the stack passed in $tokens. |
38 | 38 | * |
@@ -106,9 +106,9 @@ discard block |
||
106 | 106 | } |
107 | 107 | |
108 | 108 | $foundCalls[$i] = array( |
109 | - 'name' => $funcName, |
|
110 | - 'type' => strtolower($tokens[$prevToken]['content']), |
|
111 | - ); |
|
109 | + 'name' => $funcName, |
|
110 | + 'type' => strtolower($tokens[$prevToken]['content']), |
|
111 | + ); |
|
112 | 112 | }//end for |
113 | 113 | |
114 | 114 | $errorClassName = substr($className, 0, -7); |
@@ -122,9 +122,9 @@ discard block |
||
122 | 122 | $type = $funcData['type']; |
123 | 123 | $error = "Static calls to public methods in Action classes must not use the $type keyword; use %s::%s() instead"; |
124 | 124 | $data = array( |
125 | - $errorClassName, |
|
126 | - $funcName, |
|
127 | - ); |
|
125 | + $errorClassName, |
|
126 | + $funcName, |
|
127 | + ); |
|
128 | 128 | $phpcsFile->addError($error, $token, 'Found'.ucfirst($funcData['type']), $data); |
129 | 129 | } |
130 | 130 | } |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * Returns an array of tokens this test wants to listen for. |
21 | 21 | * |
22 | - * @return array |
|
22 | + * @return integer[] |
|
23 | 23 | */ |
24 | 24 | public function register() |
25 | 25 | { |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Processes this sniff, when one of its tokens is encountered. |
33 | 33 | * |
34 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
34 | + * @param File $phpcsFile The file being scanned. |
|
35 | 35 | * @param int $stackPtr The position of the current token in |
36 | 36 | * the stack passed in $tokens. |
37 | 37 | * |
@@ -82,7 +82,7 @@ discard block |
||
82 | 82 | * @param int $stackPtr The position in the tokens array of the |
83 | 83 | * potentially included class. |
84 | 84 | * |
85 | - * @return string |
|
85 | + * @return boolean |
|
86 | 86 | */ |
87 | 87 | protected function getIncludedClassFromToken( |
88 | 88 | $phpcsFile, |
@@ -63,17 +63,17 @@ |
||
63 | 63 | $typeName = $phpcsFile->findNext(T_CONSTANT_ENCAPSED_STRING, ($stackPtr + 2), null, false, true); |
64 | 64 | $typeName = trim($tokens[$typeName]['content'], " '"); |
65 | 65 | switch (strtolower($tokens[($stackPtr + 1)]['content'])) { |
66 | - case 'includesystem' : |
|
67 | - $included = strtolower($typeName); |
|
68 | - break; |
|
69 | - case 'includeasset' : |
|
70 | - $included = strtolower($typeName).'assettype'; |
|
71 | - break; |
|
72 | - case 'includewidget' : |
|
73 | - $included = strtolower($typeName).'widgettype'; |
|
74 | - break; |
|
75 | - default: |
|
76 | - return; |
|
66 | + case 'includesystem' : |
|
67 | + $included = strtolower($typeName); |
|
68 | + break; |
|
69 | + case 'includeasset' : |
|
70 | + $included = strtolower($typeName).'assettype'; |
|
71 | + break; |
|
72 | + case 'includewidget' : |
|
73 | + $included = strtolower($typeName).'widgettype'; |
|
74 | + break; |
|
75 | + default: |
|
76 | + return; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | if ($included === strtolower($ownClass)) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * Processes this test, when one of its tokens is encountered. |
24 | 24 | * |
25 | - * @param PHP_CodeSniffer_File $phpcsFile The file being scanned. |
|
25 | + * @param File $phpcsFile The file being scanned. |
|
26 | 26 | * @param int $stackPtr The position of the current token |
27 | 27 | * in the stack passed in $tokens. |
28 | 28 | * |