File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 1414 "require" : {
1515 "php" : " >=7.4" ,
1616 "composer-plugin-api" : " ^1.0 || ^2.0" ,
17- "squizlabs/php_codesniffer" : " ^3.6" ,
18- "symfony/polyfill-php80" : " ^1.15"
17+ "squizlabs/php_codesniffer" : " ^3.6"
1918 },
2019 "require-dev" : {
2120 "composer/composer" : " ^2.0" ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public static function getInstance(Config $config): self
2929 if (self ::$ instance === null ) {
3030 $ baseline = null ;
3131 // only read baseline if phpcs is not writing one.
32- if ($ config ->reportFile === null || str_contains ($ config ->reportFile , 'phpcs.baseline.xml ' ) === false ) {
32+ if ($ config ->reportFile === null || strpos ($ config ->reportFile , 'phpcs.baseline.xml ' ) === false ) {
3333 $ baseline = BaselineSetFactory::fromFile (DirectoryUtil::getProjectRoot () . 'phpcs.baseline.xml ' );
3434 }
3535
Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ public function onPostInstall(): void
7575 // @codeCoverageIgnoreEnd
7676 $ this ->stream ->info ('php-codesniffer-baseline: read: ' . $ this ->codeSnifferFilePath );
7777
78- if (str_contains ($ source , BaselineHandler::class)) {
78+ if (strpos ($ source , BaselineHandler::class) !== false ) {
7979 $ this ->stream ->info ('php-codesniffer-baseline: ignored. src/Files/File.php is already modified ' );
8080
8181 return ;
8282 }
8383
8484 $ search = '$messageCount++; ' ;
85- if (str_contains ($ source , $ search ) === false ) {
85+ if (strpos ($ source , $ search ) === false ) {
8686 $ this ->stream ->error ('php-codesniffer-baseline: unable to find ` ' . $ search . '` in `squizlabs/php_codesniffer/src/Files/File.php` ' );
8787
8888 return ;
You can’t perform that action at this time.
0 commit comments