Skip to content

Commit a59f917

Browse files
Merge branch '2.8' into 3.4
* 2.8: Enable native_constant_invocation CS fixer
2 parents 6872f09 + 2d6a4de commit a59f917

File tree

4 files changed

+167
-167
lines changed

4 files changed

+167
-167
lines changed

Filesystem.php

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

@@ -387,7 +387,7 @@ public function hardlink($originFile, $targetFiles)
387387
private function linkException($origin, $target, $linkType)
388388
{
389389
if (self::$lastError) {
390-
if ('\\' === DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
390+
if ('\\' === \DIRECTORY_SEPARATOR && false !== strpos(self::$lastError, 'error code(1314)')) {
391391
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);
392392
}
393393
}
@@ -421,14 +421,14 @@ public function readlink($path, $canonicalize = false)
421421
return;
422422
}
423423

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

428428
return realpath($path);
429429
}
430430

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

@@ -450,7 +450,7 @@ public function makePathRelative($endPath, $startPath)
450450
}
451451

452452
// Normalize separators on Windows
453-
if ('\\' === DIRECTORY_SEPARATOR) {
453+
if ('\\' === \DIRECTORY_SEPARATOR) {
454454
$endPath = str_replace('\\', '/', $endPath);
455455
$startPath = str_replace('\\', '/', $startPath);
456456
}

0 commit comments

Comments
 (0)