@@ -482,7 +482,7 @@ protected function markVariableDeclaration(
482482 // we catch declarations that come after implicit declarations like
483483 // use of a variable as a local.
484484 $ this ->addWarning (
485- " Redeclaration of %s %s as %s. " ,
485+ ' Redeclaration of %s %s as %s. ' ,
486486 $ stackPtr ,
487487 'VariableRedeclaration ' ,
488488 [
@@ -625,28 +625,28 @@ protected function markAllVariablesRead(File $phpcsFile, $stackPtr) {
625625 * @return void
626626 */
627627 protected function processVariableAsFunctionDefinitionArgument (File $ phpcsFile , $ stackPtr , $ varName , $ outerScope ) {
628- Helpers::debug (" processVariableAsFunctionDefinitionArgument " , $ stackPtr , $ varName );
628+ Helpers::debug (' processVariableAsFunctionDefinitionArgument ' , $ stackPtr , $ varName );
629629 $ tokens = $ phpcsFile ->getTokens ();
630630
631631 $ functionPtr = Helpers::getFunctionIndexForFunctionArgument ($ phpcsFile , $ stackPtr );
632632 if (! is_int ($ functionPtr )) {
633633 throw new \Exception ("Function index not found for function argument index {$ stackPtr }" );
634634 }
635635
636- Helpers::debug (" processVariableAsFunctionDefinitionArgument found function definition " , $ tokens [$ functionPtr ]);
636+ Helpers::debug (' processVariableAsFunctionDefinitionArgument found function definition ' , $ tokens [$ functionPtr ]);
637637 $ this ->markVariableDeclaration ($ varName , ScopeType::PARAM , null , $ stackPtr , $ functionPtr );
638638
639639 // Are we pass-by-reference?
640640 $ referencePtr = $ phpcsFile ->findPrevious (Tokens::$ emptyTokens , $ stackPtr - 1 , null , true , null , true );
641641 if (($ referencePtr !== false ) && ($ tokens [$ referencePtr ]['code ' ] === T_BITWISE_AND )) {
642- Helpers::debug (" processVariableAsFunctionDefinitionArgument found pass-by-reference to scope " , $ outerScope );
642+ Helpers::debug (' processVariableAsFunctionDefinitionArgument found pass-by-reference to scope ' , $ outerScope );
643643 $ varInfo = $ this ->getOrCreateVariableInfo ($ varName , $ functionPtr );
644644 $ varInfo ->referencedVariableScope = $ outerScope ;
645645 }
646646
647647 // Are we optional with a default?
648648 if (Helpers::getNextAssignPointer ($ phpcsFile , $ stackPtr ) !== null ) {
649- Helpers::debug (" processVariableAsFunctionDefinitionArgument optional with default " );
649+ Helpers::debug (' processVariableAsFunctionDefinitionArgument optional with default ' );
650650 $ this ->markVariableAssignment ($ varName , $ stackPtr , $ functionPtr );
651651 }
652652 }
@@ -664,7 +664,7 @@ protected function processVariableAsFunctionDefinitionArgument(File $phpcsFile,
664664 protected function processVariableAsUseImportDefinition (File $ phpcsFile , $ stackPtr , $ varName , $ outerScope ) {
665665 $ tokens = $ phpcsFile ->getTokens ();
666666
667- Helpers::debug (" processVariableAsUseImportDefinition " , $ stackPtr , $ varName , $ outerScope );
667+ Helpers::debug (' processVariableAsUseImportDefinition ' , $ stackPtr , $ varName , $ outerScope );
668668
669669 $ endOfArgsPtr = $ phpcsFile ->findPrevious ([T_CLOSE_PARENTHESIS ], $ stackPtr - 1 , null );
670670 if (! is_int ($ endOfArgsPtr )) {
@@ -1194,7 +1194,7 @@ protected function processVariableAsForeachLoopVar(File $phpcsFile, $stackPtr, $
11941194 // Are we pass-by-reference?
11951195 $ referencePtr = $ phpcsFile ->findPrevious (Tokens::$ emptyTokens , $ stackPtr - 1 , null , true , null , true );
11961196 if (($ referencePtr !== false ) && ($ tokens [$ referencePtr ]['code ' ] === T_BITWISE_AND )) {
1197- Helpers::debug (" processVariableAsForeachLoopVar: found foreach loop variable assigned by reference " );
1197+ Helpers::debug (' processVariableAsForeachLoopVar: found foreach loop variable assigned by reference ' );
11981198 $ varInfo ->isDynamicReference = true ;
11991199 }
12001200
@@ -1548,7 +1548,7 @@ protected function processVariableInString(File $phpcsFile, $stackPtr) {
15481548 if (!preg_match_all (Constants::getDoubleQuotedVarRegexp (), $ token ['content ' ], $ matches )) {
15491549 return ;
15501550 }
1551- Helpers::debug (" examining token for variable in string " , $ token );
1551+ Helpers::debug (' examining token for variable in string ' , $ token );
15521552
15531553 foreach ($ matches [1 ] as $ varName ) {
15541554 $ varName = Helpers::normalizeVarName ($ varName );
@@ -1726,7 +1726,7 @@ protected function warnAboutUnusedVariable(File $phpcsFile, VariableInfo $varInf
17261726 foreach (array_unique ($ varInfo ->allAssignments ) as $ indexForWarning ) {
17271727 Helpers::debug ("variable {$ varInfo ->name } at end of scope looks unused " );
17281728 $ phpcsFile ->addWarning (
1729- " Unused %s %s. " ,
1729+ ' Unused %s %s. ' ,
17301730 $ indexForWarning ,
17311731 'UnusedVariable ' ,
17321732 [
@@ -1746,7 +1746,7 @@ protected function warnAboutUnusedVariable(File $phpcsFile, VariableInfo $varInf
17461746 */
17471747 protected function warnAboutUndefinedVariable (File $ phpcsFile , $ varName , $ stackPtr ) {
17481748 $ phpcsFile ->addWarning (
1749- " Variable %s is undefined. " ,
1749+ ' Variable %s is undefined. ' ,
17501750 $ stackPtr ,
17511751 'UndefinedVariable ' ,
17521752 ["\${$ varName }" ]
@@ -1762,7 +1762,7 @@ protected function warnAboutUndefinedVariable(File $phpcsFile, $varName, $stackP
17621762 */
17631763 protected function warnAboutUndefinedArrayPushShortcut (File $ phpcsFile , $ varName , $ stackPtr ) {
17641764 $ phpcsFile ->addWarning (
1765- " Array variable %s is undefined. " ,
1765+ ' Array variable %s is undefined. ' ,
17661766 $ stackPtr ,
17671767 'UndefinedVariable ' ,
17681768 ["\${$ varName }" ]
@@ -1778,7 +1778,7 @@ protected function warnAboutUndefinedArrayPushShortcut(File $phpcsFile, $varName
17781778 */
17791779 protected function warnAboutUndefinedUnset (File $ phpcsFile , $ varName , $ stackPtr ) {
17801780 $ phpcsFile ->addWarning (
1781- " Variable %s inside unset call is undefined. " ,
1781+ ' Variable %s inside unset call is undefined. ' ,
17821782 $ stackPtr ,
17831783 'UndefinedUnsetVariable ' ,
17841784 ["\${$ varName }" ]
0 commit comments