@@ -44,7 +44,7 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe
44
44
$ this ->mkdir (\dirname ($ targetFile ));
45
45
46
46
$ doCopy = true ;
47
- if (!$ overwriteNewerFiles && null === parse_url ($ originFile , PHP_URL_HOST ) && is_file ($ targetFile )) {
47
+ if (!$ overwriteNewerFiles && null === parse_url ($ originFile , \ PHP_URL_HOST ) && is_file ($ targetFile )) {
48
48
$ doCopy = filemtime ($ originFile ) > filemtime ($ targetFile );
49
49
}
50
50
@@ -114,7 +114,7 @@ public function mkdir($dirs, int $mode = 0777)
114
114
*/
115
115
public function exists ($ files )
116
116
{
117
- $ maxPathLength = PHP_MAXPATHLEN - 2 ;
117
+ $ maxPathLength = \ PHP_MAXPATHLEN - 2 ;
118
118
119
119
foreach ($ this ->toIterable ($ files ) as $ file ) {
120
120
if (\strlen ($ file ) > $ maxPathLength ) {
@@ -289,7 +289,7 @@ public function rename(string $origin, string $target, bool $overwrite = false)
289
289
*/
290
290
private function isReadable (string $ filename ): bool
291
291
{
292
- $ maxPathLength = PHP_MAXPATHLEN - 2 ;
292
+ $ maxPathLength = \ PHP_MAXPATHLEN - 2 ;
293
293
294
294
if (\strlen ($ filename ) > $ maxPathLength ) {
295
295
throw new IOException (sprintf ('Could not check if file is readable because path length exceeds %d characters. ' , $ maxPathLength ), 0 , null , $ filename );
@@ -574,7 +574,7 @@ public function isAbsolutePath(string $file)
574
574
&& ': ' === $ file [1 ]
575
575
&& strspn ($ file , '/ \\' , 2 , 1 )
576
576
)
577
- || null !== parse_url ($ file , PHP_URL_SCHEME )
577
+ || null !== parse_url ($ file , \ PHP_URL_SCHEME )
578
578
;
579
579
}
580
580
@@ -690,7 +690,7 @@ public function appendToFile(string $filename, $content)
690
690
throw new IOException (sprintf ('Unable to write to the "%s" directory. ' , $ dir ), 0 , null , $ dir );
691
691
}
692
692
693
- if (false === @file_put_contents ($ filename , $ content , FILE_APPEND )) {
693
+ if (false === @file_put_contents ($ filename , $ content , \ FILE_APPEND )) {
694
694
throw new IOException (sprintf ('Failed to write file "%s". ' , $ filename ), 0 , null , $ filename );
695
695
}
696
696
}
0 commit comments