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 14
14
"require" : {
15
15
"php" : " >=7.4" ,
16
16
"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"
19
18
},
20
19
"require-dev" : {
21
20
"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
29
29
if (self ::$ instance === null ) {
30
30
$ baseline = null ;
31
31
// 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 ) {
33
33
$ baseline = BaselineSetFactory::fromFile (DirectoryUtil::getProjectRoot () . 'phpcs.baseline.xml ' );
34
34
}
35
35
Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ public function onPostInstall(): void
75
75
// @codeCoverageIgnoreEnd
76
76
$ this ->stream ->info ('php-codesniffer-baseline: read: ' . $ this ->codeSnifferFilePath );
77
77
78
- if (str_contains ($ source , BaselineHandler::class)) {
78
+ if (strpos ($ source , BaselineHandler::class) !== false ) {
79
79
$ this ->stream ->info ('php-codesniffer-baseline: ignored. src/Files/File.php is already modified ' );
80
80
81
81
return ;
82
82
}
83
83
84
84
$ search = '$messageCount++; ' ;
85
- if (str_contains ($ source , $ search ) === false ) {
85
+ if (strpos ($ source , $ search ) === false ) {
86
86
$ this ->stream ->error ('php-codesniffer-baseline: unable to find ` ' . $ search . '` in `squizlabs/php_codesniffer/src/Files/File.php` ' );
87
87
88
88
return ;
You can’t perform that action at this time.
0 commit comments