diff --git a/phpstan-baseline.php b/phpstan-baseline.php index e63572442810..c5fcc2b39491 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -1846,11 +1846,6 @@ 'count' => 1, 'path' => __DIR__ . '/system/Exceptions/PageNotFoundException.php', ]; -$ignoreErrors[] = [ - 'message' => '#^Call to method SplFileInfo\\:\\:getBasename\\(\\) with incorrect case\\: getBaseName$#', - 'count' => 1, - 'path' => __DIR__ . '/system/Files/File.php', -]; $ignoreErrors[] = [ 'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#', 'count' => 1, diff --git a/system/Files/File.php b/system/Files/File.php index 4e4ee388047e..0113112914ff 100644 --- a/system/Files/File.php +++ b/system/Files/File.php @@ -140,7 +140,7 @@ public function getRandomName(): string public function move(string $targetPath, ?string $name = null, bool $overwrite = false) { $targetPath = rtrim($targetPath, '/') . '/'; - $name ??= $this->getBaseName(); + $name ??= $this->getBasename(); $destination = $overwrite ? $targetPath . $name : $this->getDestination($targetPath . $name); $oldName = $this->getRealPath() ?: $this->__toString();