Skip to content

Commit 8fa1b5d

Browse files
Merge branch '3.4' into 4.0
* 3.4: Enable native_constant_invocation CS fixer
2 parents 1af9871 + c34def7 commit 8fa1b5d

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

File/File.php

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1769,9 +1769,9 @@ protected function prepareBaseUrl()
17691769
return $prefix;
17701770
}
17711771

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

17771777
$truncatedRequestUri = $requestUri;
@@ -1792,7 +1792,7 @@ protected function prepareBaseUrl()
17921792
$baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl));
17931793
}
17941794

1795-
return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR);
1795+
return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR);
17961796
}
17971797

17981798
/**
@@ -1814,7 +1814,7 @@ protected function prepareBasePath()
18141814
$basePath = $baseUrl;
18151815
}
18161816

1817-
if ('\\' === DIRECTORY_SEPARATOR) {
1817+
if ('\\' === \DIRECTORY_SEPARATOR) {
18181818
$basePath = str_replace('\\', '/', $basePath);
18191819
}
18201820

Response.php

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)