1- <?php declare (strict_types=1 ); # -*- coding: utf-8 -*-
1+ <?php
2+
23/*
34 * This file is part of the php-coding-standards package.
45 *
1314 * released under BSD license.
1415 */
1516
17+ declare (strict_types=1 );
18+
1619namespace Inpsyde \Sniffs \CodeQuality ;
1720
1821use PHP_CodeSniffer \Sniffs \Sniff ;
@@ -87,7 +90,6 @@ public function process(File $file, $position)
8790 return $ file ->numTokens + 1 ;
8891 }
8992
90- // phpcs:disable VariableAnalysis
9193 foreach ($ longLinesData as $ lineNum => list ($ length , $ start , $ end )) {
9294 if ($ this ->shouldIgnoreLine ($ file , $ start , $ end )) {
9395 continue ;
@@ -207,7 +209,8 @@ private function isI18nFunction(File $file, int $start, int $end): bool
207209 $ tokens = $ file ->getTokens ();
208210
209211 for ($ i = $ start ; $ i <= $ end ; $ i ++) {
210- if ($ tokens [$ i ]['code ' ] !== T_CONSTANT_ENCAPSED_STRING
212+ if (
213+ $ tokens [$ i ]['code ' ] !== T_CONSTANT_ENCAPSED_STRING
211214 || (strlen ($ tokens [$ i ]['content ' ]) + 3 ) < $ this ->lineLimit
212215 ) {
213216 continue ;
@@ -223,7 +226,8 @@ private function isI18nFunction(File $file, int $start, int $end): bool
223226 );
224227
225228 $ previous = $ previousPos ? $ tokens [$ previousPos ] ?? null : null ;
226- if (!$ previous
229+ if (
230+ !$ previous
227231 || $ previous ['code ' ] !== T_STRING
228232 || !in_array ($ previous ['content ' ], self ::I18N_FUNCTIONS , true )
229233 ) {
0 commit comments