Skip to content

Commit 7a23c5e

Browse files
Merge branch '4.0' into 4.1
* 4.0: Enable native_constant_invocation CS fixer
2 parents e3f71ee + 8fa1b5d commit 7a23c5e

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

File/File.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ protected function getTargetFile($directory, $name = null)
115115
throw new FileException(sprintf('Unable to write in the "%s" directory', $directory));
116116
}
117117

118-
$target = rtrim($directory, '/\\').DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
118+
$target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
119119

120120
return new self($target, false);
121121
}

File/MimeType/FileBinaryMimeTypeGuesser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static function isSupported()
4949
return $supported;
5050
}
5151

52-
if ('\\' === DIRECTORY_SEPARATOR || !\function_exists('passthru') || !\function_exists('escapeshellarg')) {
52+
if ('\\' === \DIRECTORY_SEPARATOR || !\function_exists('passthru') || !\function_exists('escapeshellarg')) {
5353
return $supported = false;
5454
}
5555

Request.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1766,9 +1766,9 @@ protected function prepareBaseUrl()
17661766
return $prefix;
17671767
}
17681768

1769-
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.DIRECTORY_SEPARATOR).'/')) {
1769+
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) {
17701770
// directory portion of $baseUrl matches
1771-
return rtrim($prefix, '/'.DIRECTORY_SEPARATOR);
1771+
return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR);
17721772
}
17731773

17741774
$truncatedRequestUri = $requestUri;
@@ -1789,7 +1789,7 @@ protected function prepareBaseUrl()
17891789
$baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl));
17901790
}
17911791

1792-
return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR);
1792+
return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR);
17931793
}
17941794

17951795
/**
@@ -1811,7 +1811,7 @@ protected function prepareBasePath()
18111811
$basePath = $baseUrl;
18121812
}
18131813

1814-
if ('\\' === DIRECTORY_SEPARATOR) {
1814+
if ('\\' === \DIRECTORY_SEPARATOR) {
18151815
$basePath = str_replace('\\', '/', $basePath);
18161816
}
18171817

Response.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ public function send()
370370

371371
if (\function_exists('fastcgi_finish_request')) {
372372
fastcgi_finish_request();
373-
} elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
373+
} elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
374374
static::closeOutputBuffers(0, true);
375375
}
376376

Tests/File/MimeType/MimeTypeTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function testGuessWithIncorrectPath()
5959

6060
public function testGuessWithNonReadablePath()
6161
{
62-
if ('\\' === DIRECTORY_SEPARATOR) {
62+
if ('\\' === \DIRECTORY_SEPARATOR) {
6363
$this->markTestSkipped('Can not verify chmod operations on Windows');
6464
}
6565

0 commit comments

Comments
 (0)