Skip to content

Commit 1ed8ba3

Browse files
Merge branch '4.1'
* 4.1: Enable native_constant_invocation CS fixer
2 parents 3bf57a0 + ca80b8c commit 1ed8ba3

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Helper/QuestionHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ private function autocomplete(OutputInterface $output, Question $question, $inpu
296296
*/
297297
private function getHiddenResponse(OutputInterface $output, $inputStream): string
298298
{
299-
if ('\\' === DIRECTORY_SEPARATOR) {
299+
if ('\\' === \DIRECTORY_SEPARATOR) {
300300
$exe = __DIR__.'/../Resources/bin/hiddeninput.exe';
301301

302302
// 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
@@ -46,7 +46,7 @@ public function __construct(InputInterface $input, OutputInterface $output)
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.
4848
$width = (new Terminal())->getWidth() ?: self::MAX_LINE_LENGTH;
49-
$this->lineLength = min($width - (int) (DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
49+
$this->lineLength = min($width - (int) (\DIRECTORY_SEPARATOR === '\\'), self::MAX_LINE_LENGTH);
5050

5151
parent::__construct($output);
5252
}
@@ -269,7 +269,7 @@ public function createProgressBar($max = 0)
269269
{
270270
$progressBar = parent::createProgressBar($max);
271271

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

Terminal.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getHeight()
5656

5757
private static function initDimensions()
5858
{
59-
if ('\\' === DIRECTORY_SEPARATOR) {
59+
if ('\\' === \DIRECTORY_SEPARATOR) {
6060
if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {
6161
// extract [w, H] from "wxh (WxH)"
6262
// or [w, h] from "wxh"

Tests/Helper/QuestionHelperTest.php

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

222222
public function testAskHiddenResponse()
223223
{
224-
if ('\\' === DIRECTORY_SEPARATOR) {
224+
if ('\\' === \DIRECTORY_SEPARATOR) {
225225
$this->markTestSkipped('This test is not supported on Windows');
226226
}
227227

0 commit comments

Comments
 (0)