@@ -102,7 +102,7 @@ public function mkdir(string|iterable $dirs, int $mode = 0777)
102102 *
103103 * @return bool true if the file exists, false otherwise
104104 */
105- public function exists (string |iterable $ files )
105+ public function exists (string |iterable $ files ): bool
106106 {
107107 $ maxPathLength = \PHP_MAXPATHLEN - 2 ;
108108
@@ -399,10 +399,8 @@ private function linkException(string $origin, string $target, string $linkType)
399399 * With $canonicalize = true
400400 * - if $path does not exist, returns null
401401 * - if $path exists, returns its absolute fully resolved final version
402- *
403- * @return string|null
404402 */
405- public function readlink (string $ path , bool $ canonicalize = false )
403+ public function readlink (string $ path , bool $ canonicalize = false ): ? string
406404 {
407405 if (!$ canonicalize && !is_link ($ path )) {
408406 return null ;
@@ -424,7 +422,7 @@ public function readlink(string $path, bool $canonicalize = false)
424422 *
425423 * @return string Path of target relative to starting path
426424 */
427- public function makePathRelative (string $ endPath , string $ startPath )
425+ public function makePathRelative (string $ endPath , string $ startPath ): string
428426 {
429427 if (!$ this ->isAbsolutePath ($ startPath )) {
430428 throw new InvalidArgumentException (sprintf ('The start path "%s" is not absolute. ' , $ startPath ));
@@ -570,10 +568,8 @@ public function mirror(string $originDir, string $targetDir, \Traversable $itera
570568
571569 /**
572570 * Returns whether the file path is an absolute path.
573- *
574- * @return bool
575571 */
576- public function isAbsolutePath (string $ file )
572+ public function isAbsolutePath (string $ file ): bool
577573 {
578574 return '' !== $ file && (strspn ($ file , '/ \\' , 0 , 1 )
579575 || (\strlen ($ file ) > 3 && ctype_alpha ($ file [0 ])
@@ -593,7 +589,7 @@ public function isAbsolutePath(string $file)
593589 *
594590 * @return string The new temporary filename (with path), or throw an exception on failure
595591 */
596- public function tempnam (string $ dir , string $ prefix/*, string $suffix = ''*/ )
592+ public function tempnam (string $ dir , string $ prefix/*, string $suffix = ''*/ ): string
597593 {
598594 $ suffix = \func_num_args () > 2 ? func_get_arg (2 ) : '' ;
599595 [$ scheme , $ hierarchy ] = $ this ->getSchemeAndHierarchy ($ dir );
0 commit comments