You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewFileNotFoundException(sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
43
+
thrownewFileNotFoundException(\sprintf('Failed to copy "%s" because file does not exist.', $originFile), 0, null, $originFile);
44
44
}
45
45
46
46
$this->mkdir(\dirname($targetFile));
@@ -53,12 +53,12 @@ public function copy(string $originFile, string $targetFile, bool $overwriteNewe
53
53
if ($doCopy) {
54
54
// https://bugs.php.net/64634
55
55
if (!$source = self::box('fopen', $originFile, 'r')) {
56
-
thrownewIOException(sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
56
+
thrownewIOException(\sprintf('Failed to copy "%s" to "%s" because source file could not be opened for reading: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
57
57
}
58
58
59
59
// Stream context created to allow files overwrite when using FTP stream wrapper - disabled by default
thrownewIOException(sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
61
+
thrownewIOException(\sprintf('Failed to copy "%s" to "%s" because target file could not be opened for writing: ', $originFile, $targetFile).self::$lastError, 0, null, $originFile);
if ($bytesCopied !== $bytesOrigin = filesize($originFile)) {
81
-
thrownewIOException(sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
81
+
thrownewIOException(\sprintf('Failed to copy the whole content of "%s" to "%s" (%g of %g bytes copied).', $originFile, $targetFile, $bytesCopied, $bytesOrigin), 0, null, $originFile);
82
82
}
83
83
}
84
84
}
@@ -99,7 +99,7 @@ public function mkdir(string|iterable $dirs, int $mode = 0777)
99
99
}
100
100
101
101
if (!self::box('mkdir', $dir, $mode, true) && !is_dir($dir)) {
102
-
thrownewIOException(sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir);
102
+
thrownewIOException(\sprintf('Failed to create "%s": ', $dir).self::$lastError, 0, null, $dir);
103
103
}
104
104
}
105
105
}
@@ -113,7 +113,7 @@ public function exists(string|iterable $files): bool
113
113
114
114
foreach ($this->toIterable($files) as$file) {
115
115
if (\strlen($file) > $maxPathLength) {
116
-
thrownewIOException(sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
116
+
thrownewIOException(\sprintf('Could not check if file exist because path length exceeds %d characters.', $maxPathLength), 0, null, $file);
117
117
}
118
118
119
119
if (!file_exists($file)) {
@@ -138,7 +138,7 @@ public function touch(string|iterable $files, ?int $time = null, ?int $atime = n
if ('\\' === \DIRECTORY_SEPARATOR && str_contains(self::$lastError, 'error code(1314)')) {
419
-
thrownewIOException(sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
419
+
thrownewIOException(\sprintf('Unable to create "%s" link due to error code 1314: \'A required privilege is not held by the client\'. Do you have the required Administrator-rights?', $linkType), 0, null, $target);
420
420
}
421
421
}
422
-
thrownewIOException(sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target);
422
+
thrownewIOException(\sprintf('Failed to create "%s" link from "%s" to "%s": ', $linkType, $origin, $target).self::$lastError, 0, null, $target);
423
423
}
424
424
425
425
/**
@@ -456,11 +456,11 @@ public function readlink(string $path, bool $canonicalize = false): ?string
thrownewInvalidArgumentException(sprintf('The base path must be a non-empty string. Got: "%s".', $basePath));
440
+
thrownewInvalidArgumentException(\sprintf('The base path must be a non-empty string. Got: "%s".', $basePath));
441
441
}
442
442
443
443
if (!self::isAbsolute($basePath)) {
444
-
thrownewInvalidArgumentException(sprintf('The base path "%s" is not an absolute path.', $basePath));
444
+
thrownewInvalidArgumentException(\sprintf('The base path "%s" is not an absolute path.', $basePath));
445
445
}
446
446
447
447
if (self::isAbsolute($path)) {
@@ -531,12 +531,12 @@ public static function makeRelative(string $path, string $basePath): string
531
531
// If the passed path is absolute, but the base path is not, we
532
532
// cannot generate a relative path
533
533
if ('' !== $root && '' === $baseRoot) {
534
-
thrownewInvalidArgumentException(sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath));
534
+
thrownewInvalidArgumentException(\sprintf('The absolute path "%s" cannot be made relative to the relative path "%s". You should provide an absolute base path instead.', $path, $basePath));
535
535
}
536
536
537
537
// Fail if the roots of the two paths are different
538
538
if ($baseRoot && $root !== $baseRoot) {
539
-
thrownewInvalidArgumentException(sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot));
539
+
thrownewInvalidArgumentException(\sprintf('The path "%s" cannot be made relative to "%s", because they have different roots ("%s" and "%s").', $path, $basePath, $root, $baseRoot));
0 commit comments