Skip to content

Commit 2e30335

Browse files
Merge branch '4.0' into 4.1
* 4.0: Enable native_constant_invocation CS fixer
2 parents e9e8bd3 + 7750bf0 commit 2e30335

File tree

3 files changed

+166
-166
lines changed

3 files changed

+166
-166
lines changed

Filesystem.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public function remove($files)
171171
foreach ($files as $file) {
172172
if (is_link($file)) {
173173
// See https://bugs.php.net/52176
174-
if (!(self::box('unlink', $file) || '\\' !== DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
174+
if (!(self::box('unlink', $file) || '\\' !== \DIRECTORY_SEPARATOR || self::box('rmdir', $file)) && file_exists($file)) {
175175
throw new IOException(sprintf('Failed to remove symlink "%s": %s.', $file, self::$lastError));
176176
}
177177
} elseif (is_dir($file)) {
@@ -322,7 +322,7 @@ private function isReadable($filename)
322322
*/
323323
public function symlink($originDir, $targetDir, $copyOnWindows = false)
324324
{
325-
if ('\\' === DIRECTORY_SEPARATOR) {
325+
if ('\\' === \DIRECTORY_SEPARATOR) {
326326
$originDir = strtr($originDir, '/', '\\');
327327
$targetDir = strtr($targetDir, '/', '\\');
328328

@@ -388,7 +388,7 @@ public function hardlink($originFile, $targetFiles)
388388
private function linkException($origin, $target, $linkType)
389389
{
390390
if (self::$lastError) {
391-
if ('\\' === DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
391+
if ('\\' === \DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
392392
throw new IOException(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);
393393
}
394394
}
@@ -422,14 +422,14 @@ public function readlink($path, $canonicalize = false)
422422
return;
423423
}
424424

425-
if ('\\' === DIRECTORY_SEPARATOR) {
425+
if ('\\' === \DIRECTORY_SEPARATOR) {
426426
$path = readlink($path);
427427
}
428428

429429
return realpath($path);
430430
}
431431

432-
if ('\\' === DIRECTORY_SEPARATOR) {
432+
if ('\\' === \DIRECTORY_SEPARATOR) {
433433
return realpath($path);
434434
}
435435

@@ -455,7 +455,7 @@ public function makePathRelative($endPath, $startPath)
455455
}
456456

457457
// Normalize separators on Windows
458-
if ('\\' === DIRECTORY_SEPARATOR) {
458+
if ('\\' === \DIRECTORY_SEPARATOR) {
459459
$endPath = str_replace('\\', '/', $endPath);
460460
$startPath = str_replace('\\', '/', $startPath);
461461
}

0 commit comments

Comments
 (0)