Skip to content

Commit bea603f

Browse files
committed
Add string cast to make PHPStan happy
1 parent 8c6aad5 commit bea603f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/bitExpert/PHPStan/Magento/Autoload/FactoryAutoloader.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function getFileContents(string $class): string
6969
$namespace = explode('\\', ltrim($class, '\\'));
7070
/** @var string $factoryClassname */
7171
$factoryClassname = array_pop($namespace);
72-
$originalClassname = preg_replace('#Factory$#', '', $factoryClassname) ?? $factoryClassname;
72+
$originalClassname = (string) preg_replace('#Factory$#', '', $factoryClassname);
7373
$namespace = implode('\\', $namespace);
7474

7575
$template = "<?php\n";

0 commit comments

Comments
 (0)