@@ -34,10 +34,10 @@ public function process(File $phpcsFile, $stackPtr) {
3434 /**
3535 * @param \PHP_CodeSniffer\Files\File $phpcsFile
3636 * @param int $stackPtr
37- *
37+ *
3838 * @return void
3939 */
40- protected function assertSpaceBefore (File $ phpcsFile , $ stackPtr ) {
40+ protected function assertSpaceBefore (File $ phpcsFile , int $ stackPtr ): void {
4141 $ previous = $ phpcsFile ->findPrevious (T_WHITESPACE , $ stackPtr - 1 , null , true );
4242 if ($ stackPtr - $ previous > 1 ) {
4343 $ this ->assertSingleSpaceBeforeIfNotMultiline ($ phpcsFile , $ stackPtr , $ previous );
@@ -58,10 +58,10 @@ protected function assertSpaceBefore(File $phpcsFile, $stackPtr) {
5858 * @param \PHP_CodeSniffer\Files\File $phpcsFile
5959 * @param int $stackPtr
6060 * @param int $previous
61- *
61+ *
6262 * @return void
6363 */
64- protected function assertSingleSpaceBeforeIfNotMultiline (File $ phpcsFile , $ stackPtr , $ previous ) {
64+ protected function assertSingleSpaceBeforeIfNotMultiline (File $ phpcsFile , int $ stackPtr , int $ previous ): void {
6565 $ tokens = $ phpcsFile ->getTokens ();
6666
6767 if ($ tokens [$ stackPtr ]['line ' ] !== $ tokens [$ previous ]['line ' ]) {
@@ -81,10 +81,10 @@ protected function assertSingleSpaceBeforeIfNotMultiline(File $phpcsFile, $stack
8181 /**
8282 * @param \PHP_CodeSniffer\Files\File $phpcsFile
8383 * @param int $thenIndex
84- *
84+ *
8585 * @return void
8686 */
87- protected function checkAfter (File $ phpcsFile , $ thenIndex ) {
87+ protected function checkAfter (File $ phpcsFile , int $ thenIndex ): void {
8888 $ elseIndex = $ phpcsFile ->findNext (T_INLINE_ELSE , $ thenIndex + 1 );
8989 if (!$ elseIndex ) {
9090 return ;
@@ -106,10 +106,10 @@ protected function checkAfter(File $phpcsFile, $thenIndex) {
106106 * @param \PHP_CodeSniffer\Files\File $phpcsFile
107107 * @param int $thenIndex
108108 * @param int $elseIndex
109- *
109+ *
110110 * @return void
111111 */
112- protected function assertNoSpaceBetween (File $ phpcsFile , $ thenIndex , $ elseIndex ) {
112+ protected function assertNoSpaceBetween (File $ phpcsFile , int $ thenIndex , int $ elseIndex ): void {
113113 if ($ elseIndex - $ thenIndex === 1 ) {
114114 return ;
115115 }
@@ -128,10 +128,10 @@ protected function assertNoSpaceBetween(File $phpcsFile, $thenIndex, $elseIndex)
128128 /**
129129 * @param \PHP_CodeSniffer\Files\File $phpcsFile
130130 * @param int $stackPtr
131- *
131+ *
132132 * @return void
133133 */
134- protected function assertSpaceAfter (File $ phpcsFile , $ stackPtr ) {
134+ protected function assertSpaceAfter (File $ phpcsFile , int $ stackPtr ): void {
135135 $ nextIndex = $ phpcsFile ->findNext (T_WHITESPACE , $ stackPtr + 1 , null , true );
136136 if ($ nextIndex - $ stackPtr > 1 ) {
137137 $ this ->assertSingleSpaceAfterIfNotMultiline ($ phpcsFile , $ stackPtr , $ nextIndex );
@@ -152,10 +152,10 @@ protected function assertSpaceAfter(File $phpcsFile, $stackPtr) {
152152 * @param \PHP_CodeSniffer\Files\File $phpcsFile
153153 * @param int $stackPtr
154154 * @param int $next
155- *
155+ *
156156 * @return void
157157 */
158- protected function assertSingleSpaceAfterIfNotMultiline (File $ phpcsFile , $ stackPtr , $ next ) {
158+ protected function assertSingleSpaceAfterIfNotMultiline (File $ phpcsFile , int $ stackPtr , int $ next ): void {
159159 $ tokens = $ phpcsFile ->getTokens ();
160160
161161 if ($ tokens [$ stackPtr ]['line ' ] !== $ tokens [$ next ]['line ' ]) {
0 commit comments