Skip to content

Commit 16ee8ce

Browse files
authored
Propose stricter types por SplFileInfo
Those methods can return an empty string, but only if the instance is created with an empty string. I propose these changes in bleeding edge, as it would break the compatibility in the constructor.
1 parent 0e00d4b commit 16ee8ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

resources/functionMap_bleedingEdge.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
return [
44
'new' => [
55
'php_uname' => ['string', 'mode='=>'"a"|"s"|"n"|"r"|"v"|"m"'],
6+
'SplFileInfo::__construct' => ['void', 'filename'=>'non-empty-string'],
7+
'SplFileInfo::__toString' => ['non-empty-string'],
8+
'SplFileInfo::getBasename' => ['non-empty-string', 'suffix='=>'string'],
9+
'SplFileInfo::getFilename' => ['non-empty-string'],
10+
'SplFileInfo::getPathname' => ['non-empty-string'],
11+
'SplFileInfo::getRealPath' => ['non-empty-string|false'],
612
],
713
'old' => [
814
'php_uname' => ['string', 'mode='=>'string'],

0 commit comments

Comments
 (0)