Skip to content

Commit 1e61ebd

Browse files
authored
Merge pull request #8423 from kenjis/fix-SplFileInfo-getBasename-case
style: fix incorrect case method name `SplFileInfo-getBaseName()`
2 parents 9582c8f + 8c23fed commit 1e61ebd

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,11 +1841,6 @@
18411841
'count' => 1,
18421842
'path' => __DIR__ . '/system/Exceptions/PageNotFoundException.php',
18431843
];
1844-
$ignoreErrors[] = [
1845-
'message' => '#^Call to method SplFileInfo\\:\\:getBasename\\(\\) with incorrect case\\: getBaseName$#',
1846-
'count' => 1,
1847-
'path' => __DIR__ . '/system/Files/File.php',
1848-
];
18491844
$ignoreErrors[] = [
18501845
'message' => '#^Construct empty\\(\\) is not allowed\\. Use more strict comparison\\.$#',
18511846
'count' => 1,

system/Files/File.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ public function getRandomName(): string
140140
public function move(string $targetPath, ?string $name = null, bool $overwrite = false)
141141
{
142142
$targetPath = rtrim($targetPath, '/') . '/';
143-
$name ??= $this->getBaseName();
143+
$name ??= $this->getBasename();
144144
$destination = $overwrite ? $targetPath . $name : $this->getDestination($targetPath . $name);
145145

146146
$oldName = $this->getRealPath() ?: $this->__toString();

0 commit comments

Comments
 (0)