@@ -30,22 +30,22 @@ public function register(): array {
3030 /**
3131 * @inheritDoc
3232 */
33- public function process (File $ phpCsFile , $ stackPointer ): void {
34- $ tokens = $ phpCsFile ->getTokens ();
33+ public function process (File $ phpcsFile , int $ stackPointer ): void {
34+ $ tokens = $ phpcsFile ->getTokens ();
3535
36- $ docBlockEndIndex = $ this ->findRelatedDocBlock ($ phpCsFile , $ stackPointer );
36+ $ docBlockEndIndex = $ this ->findRelatedDocBlock ($ phpcsFile , $ stackPointer );
3737
3838 if (!$ docBlockEndIndex ) {
3939 return ;
4040 }
4141
4242 $ docBlockStartIndex = $ tokens [$ docBlockEndIndex ]['comment_opener ' ];
4343
44- if ($ this ->hasInheritDoc ($ phpCsFile , $ docBlockStartIndex , $ docBlockEndIndex )) {
44+ if ($ this ->hasInheritDoc ($ phpcsFile , $ docBlockStartIndex , $ docBlockEndIndex )) {
4545 return ;
4646 }
4747
48- $ methodSignature = $ this ->getMethodSignature ($ phpCsFile , $ stackPointer );
48+ $ methodSignature = $ this ->getMethodSignature ($ phpcsFile , $ stackPointer );
4949 if (!$ methodSignature ) {
5050 return ;
5151 }
@@ -62,7 +62,7 @@ public function process(File $phpCsFile, $stackPointer): void {
6262 $ classNameIndex = $ i + 2 ;
6363
6464 if ($ tokens [$ classNameIndex ]['type ' ] !== 'T_DOC_COMMENT_STRING ' ) {
65- $ phpCsFile ->addError ('Missing type in param doc block ' , $ i , 'MissingParamType ' );
65+ $ phpcsFile ->addError ('Missing type in param doc block ' , $ i , 'MissingParamType ' );
6666
6767 continue ;
6868 }
@@ -89,7 +89,7 @@ public function process(File $phpCsFile, $stackPointer): void {
8989 }
9090
9191 if (count ($ docBlockParams ) !== count ($ methodSignature )) {
92- $ phpCsFile ->addError ('Doc Block params do not match method signature ' , $ stackPointer , 'ParamTypeMismatch ' );
92+ $ phpcsFile ->addError ('Doc Block params do not match method signature ' , $ stackPointer , 'ParamTypeMismatch ' );
9393
9494 return ;
9595 }
@@ -108,10 +108,10 @@ public function process(File $phpCsFile, $stackPointer): void {
108108
109109 $ error = 'Doc Block param variable ` ' . $ docBlockParam ['variable ' ] . '` should be ` ' . $ variableName . '` ' ;
110110 // For now just report (buggy yet)
111- $ phpCsFile ->addError ($ error , $ docBlockParam ['index ' ], 'VariableWrong ' );
111+ $ phpcsFile ->addError ($ error , $ docBlockParam ['index ' ], 'VariableWrong ' );
112112
113113 /*
114- $fix = $phpCsFile ->addFixableError($error, $docBlockParam['index'], 'VariableWrong');
114+ $fix = $phpcsFile ->addFixableError($error, $docBlockParam['index'], 'VariableWrong');
115115 if ($fix) {
116116 if ($docBlockParam['variable']) {
117117 $appendix = str_replace($docBlockParam['variable'], '', $docBlockParam['appendix']);
@@ -120,7 +120,7 @@ public function process(File $phpCsFile, $stackPointer): void {
120120 $appendix = ' ' . $variableName . $docBlockParam['appendix'];
121121 }
122122 $content = $docBlockParam['type'] . $appendix;
123- $phpCsFile ->fixer->replaceToken($docBlockParam['index'], $content);
123+ $phpcsFile ->fixer->replaceToken($docBlockParam['index'], $content);
124124 }
125125 */
126126 }
@@ -129,34 +129,34 @@ public function process(File $phpCsFile, $stackPointer): void {
129129 /**
130130 * //TODO: Replace with SignatureTrait
131131 *
132- * @param \PHP_CodeSniffer\Files\File $phpCsFile
132+ * @param \PHP_CodeSniffer\Files\File $phpcsFile
133133 * @param int $stackPtr
134134*
135135 * @return array
136136 */
137- private function getMethodSignature (File $ phpCsFile , int $ stackPtr ): array {
138- $ tokens = $ phpCsFile ->getTokens ();
137+ private function getMethodSignature (File $ phpcsFile , int $ stackPtr ): array {
138+ $ tokens = $ phpcsFile ->getTokens ();
139139
140- $ startIndex = $ phpCsFile ->findNext (T_OPEN_PARENTHESIS , $ stackPtr + 1 );
140+ $ startIndex = $ phpcsFile ->findNext (T_OPEN_PARENTHESIS , $ stackPtr + 1 );
141141 $ endIndex = $ tokens [$ startIndex ]['parenthesis_closer ' ];
142142
143143 $ arguments = [];
144144 $ i = $ startIndex ;
145- while ($ nextVariableIndex = $ phpCsFile ->findNext (T_VARIABLE , $ i + 1 , $ endIndex )) {
145+ while ($ nextVariableIndex = $ phpcsFile ->findNext (T_VARIABLE , $ i + 1 , $ endIndex )) {
146146 $ typehint = $ default = null ;
147147 $ possibleTypeHint =
148- $ phpCsFile ->findPrevious ([T_ARRAY , T_CALLABLE ], $ nextVariableIndex - 1 , $ nextVariableIndex - 3 );
148+ $ phpcsFile ->findPrevious ([T_ARRAY , T_CALLABLE ], $ nextVariableIndex - 1 , $ nextVariableIndex - 3 );
149149 if ($ possibleTypeHint ) {
150150 $ typehint = $ possibleTypeHint ;
151151 }
152152 if ($ possibleTypeHint ) {
153153 $ typehint = $ possibleTypeHint ;
154154 }
155155
156- $ possibleEqualIndex = $ phpCsFile ->findNext ([T_EQUAL ], $ nextVariableIndex + 1 , $ nextVariableIndex + 2 );
156+ $ possibleEqualIndex = $ phpcsFile ->findNext ([T_EQUAL ], $ nextVariableIndex + 1 , $ nextVariableIndex + 2 );
157157 if ($ possibleEqualIndex ) {
158158 $ possibleDefaultValue =
159- $ phpCsFile ->findNext (
159+ $ phpcsFile ->findNext (
160160 [T_STRING , T_TRUE , T_FALSE , T_NULL , T_ARRAY ],
161161 $ possibleEqualIndex + 1 ,
162162 $ possibleEqualIndex + 2 ,
0 commit comments