File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
src/Standards/Generic/Sniffs/PHP Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -84,11 +84,19 @@ private function getPhpLintCommand(File $phpcsFile)
8484 {
8585 if ($ phpcsFile ->getFilename () === 'STDIN ' ) {
8686 $ content = $ phpcsFile ->getTokensAsString (0 , $ phpcsFile ->numTokens );
87- return "echo " .escapeshellarg ($ content )." | " .Common::escapeshellcmd ($ this ->phpPath )." -l -d display_errors=1 -d error_prepend_string='' 2>&1 " ;
87+ return sprintf (
88+ "echo %s | %s -l -d display_errors=1 -d error_prepend_string='' 2>&1 " ,
89+ escapeshellarg ($ content ),
90+ Common::escapeshellcmd ($ this ->phpPath )
91+ );
8892 }
8993
9094 $ fileName = escapeshellarg ($ phpcsFile ->getFilename ());
91- return Common::escapeshellcmd ($ this ->phpPath )." -l -d display_errors=1 -d error_prepend_string='' $ fileName 2>&1 " ;
95+ return sprintf (
96+ "%s -l -d display_errors=1 -d error_prepend_string='' %s 2>&1 " ,
97+ Common::escapeshellcmd ($ this ->phpPath ),
98+ $ fileName
99+ );
92100
93101 }//end getPhpLintCommand()
94102
You can’t perform that action at this time.
0 commit comments