Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 24b76ca

Browse files
authored
Fix php 7.4 regression on strtolower to false on ClassLikeNameClassNameImportSkipVoter (#7436)
* Fix php 7.4 regression on strtolower to false on ClassLikeNameClassNameImportSkipVoter * Fix php 7.4 regression on strtolower to false on ClassLikeNameClassNameImportSkipVoter
1 parent fe7432b commit 24b76ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/CodingStyle/ClassNameImport/ClassNameImportSkipVoter/ClassLikeNameClassNameImportSkipVoter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function shouldSkip(File $file, FullyQualifiedObjectType $fullyQualifiedO
4747

4848
$shortNameLowered = $fullyQualifiedObjectType->getShortNameLowered();
4949
$fullyQualifiedObjectTypeNamespace = strtolower(
50-
substr($fullyQualifiedObjectType->getClassName(), 0, -strlen($fullyQualifiedObjectType->getShortName()) - 1)
50+
substr($fullyQualifiedObjectType->getClassName(), 0, -strlen($fullyQualifiedObjectType->getShortName()) - 1) ?: ''
5151
);
5252

5353
foreach ($classLikeNames as $classLikeName) {

0 commit comments

Comments
 (0)