Skip to content

Commit 0c1fcbb

Browse files
Enable native_constant_invocation CS fixer
1 parent 94bd63f commit 0c1fcbb

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

Application.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ public function getTerminalDimensions()
747747
return $this->terminalDimensions;
748748
}
749749

750-
if ('\\' === DIRECTORY_SEPARATOR) {
750+
if ('\\' === \DIRECTORY_SEPARATOR) {
751751
// extract [w, H] from "wxh (WxH)"
752752
if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) {
753753
return array((int) $matches[1], (int) $matches[2]);

Command/Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ public function setCode($code)
264264
throw new InvalidArgumentException('Invalid callable provided to Command::setCode.');
265265
}
266266

267-
if (PHP_VERSION_ID >= 50400 && $code instanceof \Closure) {
267+
if (\PHP_VERSION_ID >= 50400 && $code instanceof \Closure) {
268268
$r = new \ReflectionFunction($code);
269269
if (null === $r->getClosureThis()) {
270-
if (PHP_VERSION_ID < 70000) {
270+
if (\PHP_VERSION_ID < 70000) {
271271
// Bug in PHP5: https://bugs.php.net/bug.php?id=64761
272272
// This means that we cannot bind static closures and therefore we must
273273
// ignore any errors here. There is no way to test if the closure is

Helper/DialogHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public function askHiddenResponse(OutputInterface $output, $question, $fallback
284284
$output = $output->getErrorOutput();
285285
}
286286

287-
if ('\\' === DIRECTORY_SEPARATOR) {
287+
if ('\\' === \DIRECTORY_SEPARATOR) {
288288
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
289289

290290
// handle code running from a phar

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
321321
*/
322322
private function getHiddenResponse(OutputInterface $output, $inputStream)
323323
{
324-
if ('\\' === DIRECTORY_SEPARATOR) {
324+
if ('\\' === \DIRECTORY_SEPARATOR) {
325325
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
326326

327327
// handle code running from a phar

Output/StreamOutput.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ protected function hasColorSupport()
9797
return true;
9898
}
9999

100-
if (DIRECTORY_SEPARATOR === '\\') {
100+
if (\DIRECTORY_SEPARATOR === '\\') {
101101
return (\function_exists('sapi_windows_vt100_support')
102102
&& @sapi_windows_vt100_support($this->stream))
103103
|| false !== getenv('ANSICON')

Style/SymfonyStyle.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(InputInterface $input, OutputInterface $output)
4545
$this->input = $input;
4646
$this->bufferedOutput = new BufferedOutput($output->getVerbosity(), false, clone $output->getFormatter());
4747
// Windows cmd wraps lines as soon as the terminal width is reached, whether there are following chars or not.
48-
$this->lineLength = min($this->getTerminalWidth() - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
48+
$this->lineLength = min($this->getTerminalWidth() - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
4949

5050
parent::__construct($output);
5151
}
@@ -271,7 +271,7 @@ public function createProgressBar($max = 0)
271271
{
272272
$progressBar = parent::createProgressBar($max);
273273

274-
if ('\\' !== DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
274+
if ('\\' !== \DIRECTORY_SEPARATOR || 'Hyper' === getenv('TERM_PROGRAM')) {
275275
$progressBar->setEmptyBarCharacter(''); // light shade character \u2591
276276
$progressBar->setProgressCharacter('');
277277
$progressBar->setBarCharacter(''); // dark shade character \u2593

Tests/Helper/LegacyDialogHelperTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ public function testAskWithAutocomplete()
138138
*/
139139
public function testAskHiddenResponse()
140140
{
141-
if ('\\' === DIRECTORY_SEPARATOR) {
141+
if ('\\' === \DIRECTORY_SEPARATOR) {
142142
$this->markTestSkipped('This test is not supported on Windows');
143143
}
144144

@@ -154,7 +154,7 @@ public function testAskHiddenResponse()
154154
*/
155155
public function testAskHiddenResponseOnErrorOutput()
156156
{
157-
if ('\\' === DIRECTORY_SEPARATOR) {
157+
if ('\\' === \DIRECTORY_SEPARATOR) {
158158
$this->markTestSkipped('This test is not supported on Windows');
159159
}
160160

Tests/Helper/QuestionHelperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public function testAutocompleteWithTrailingBackslash()
226226

227227
public function testAskHiddenResponse()
228228
{
229-
if ('\\' === DIRECTORY_SEPARATOR) {
229+
if ('\\' === \DIRECTORY_SEPARATOR) {
230230
$this->markTestSkipped('This test is not supported on Windows');
231231
}
232232

0 commit comments

Comments
 (0)