8000 Enable native_constant_invocation CS fixer · symfony/http-foundation@ab52696 · GitHub
[go: up one dir, main page]

Skip to content

Commit ab52696

Browse files
Enable native_constant_invocation CS fixer
1 parent 94bbf07 commit ab52696

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
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: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public static function createFromGlobals()
276276
// stores the Content-Type and Content-Length header values in
277277
// HTTP_CONTENT_TYPE and HTTP_CONTENT_LENGTH fields.
278278
$server = $_SERVER;
279-
if ('cli-server' === PHP_SAPI) {
279+
if ('cli-server' === \PHP_SAPI) {
280280
if (array_key_exists('HTTP_CONTENT_LENGTH', $_SERVER)) {
281281
$server['CONTENT_LENGTH'] = $_SERVER['HTTP_CONTENT_LENGTH'];
282282
}
@@ -1772,9 +1772,9 @@ protected function prepareBaseUrl()
17721772
return $prefix;
17731773
}
17741774

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

17801780
$truncatedRequestUri = $requestUri;
@@ -1795,7 +1795,7 @@ protected function prepareBaseUrl()
17951795
$baseUrl = substr($requestUri, 0, $pos + \strlen($baseUrl));
17961796
}
17971797

1798-
return rtrim($baseUrl, '/'.DIRECTORY_SEPARATOR);
1798+
return rtrim($baseUrl, '/'.\DIRECTORY_SEPARATOR);
17991799
}
18001800

18011801
/**
@@ -1817,7 +1817,7 @@ protected function prepareBasePath()
18171817
$basePath = $baseUrl;
18181818
}
18191819

1820-
if ('\\' === DIRECTORY_SEPARATOR) {
1820+
if ('\\' === \DIRECTORY_SEPARATOR) {
18211821
$basePath = str_replace('\\', '/', $basePath);
18221822
}
18231823

Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ public function send()
384384

385385
if (\function_exists('fastcgi_finish_request')) {
386386
fastcgi_finish_request();
387-
} elseif (!\in_array(PHP_SAPI, array('cli', 'phpdbg'), true)) {
387+
} elseif (!\in_array(\PHP_SAPI, array('cli', 'phpdbg'), true)) {
388388
static::closeOutputBuffers(0, true);
389389
}
390390

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)
0