Skip to content

Commit c34def7

Browse files
Merge branch '2.8' into 3.4
* 2.8: Enable native_constant_invocation CS fixer
2 parents 24ca731 + ab52696 commit c34def7

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
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

+5-5
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ public static function createFromGlobals()
302302
// stores the Content-Type and Content-Length header values in
303303
// HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH fields.
304304
$server = $_SERVER;
305-
if ('cli-server' === PHP_SAPI) {
305+
if ('cli-server' === \PHP_SAPI) {
306306
if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) {
307307
$server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH'];
308308
}
@@ -1907,9 +1907,9 @@ protected function prepareBaseUrl()
19071907
return $prefix;
19081908
}
19091909

1910-
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.DIRECTORY_SEPARATOR).'/')) {
1910+
if ($baseUrl && false !== $prefix = $this->getUrlencodedPrefix($requestUri, rtrim(\dirname($baseUrl), '/'.\DIRECTORY_SEPARATOR).'/')) {
19111911
// directory portion of $baseUrl matches
1912-
return rtrim($prefix, '/'.DIRECTORY_SEPARATOR);
1912+
return rtrim($prefix, '/'.\DIRECTORY_SEPARATOR);
19131913
}
19141914

19151915
$truncatedRequestUri = $requestUri;
@@ -1930,7 +1930,7 @@ protected function prepareBaseUrl()
19301930
$baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl));
19311931
}
19321932

1933-
return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR);
1933+
return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR);
19341934
}
19351935

19361936
/**
@@ -1952,7 +1952,7 @@ protected function prepareBasePath()
19521952
$basePath = $baseUrl;
19531953
}
19541954

1955-
if ('\\' === DIRECTORY_SEPARATOR) {
1955+
if ('\\' === \DIRECTORY_SEPARATOR) {
19561956
$basePath = str_replace('\\', '/', $basePath);
19571957
}
19581958

Response.php

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

375375
if (\function_exists('fastcgi_finish_request')) {
376376
fastcgi_finish_request();
377-
} elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
377+
} elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
378378
static::closeOutputBuffers(0, true);
379379
}
380380

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)