Skip to content

Commit a3eca77

Browse files
[Console] cleanup
1 parent 8150927 commit a3eca77

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/Symfony/Component/Console/Input/InputOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function __construct(
7979
throw new InvalidArgumentException('An option name cannot be empty.');
8080
}
8181

82-
if ('' === $shortcut || [] === $shortcut || false === $shortcut) {
82+
if ('' === $shortcut || [] === $shortcut) {
8383
$shortcut = null;
8484
}
8585

src/Symfony/Component/Console/Tests/Input/InputOptionTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ public function testShortcut()
7373
$this->assertSame('0|z', $option->getShortcut(), '-0 is an acceptable shortcut value when embedded in an array');
7474
$option = new InputOption('foo', '0|z');
7575
$this->assertSame('0|z', $option->getShortcut(), '-0 is an acceptable shortcut value when embedded in a string-list');
76-
$option = new InputOption('foo', false);
77-
$this->assertNull($option->getShortcut(), '__construct() makes the shortcut null when given a false as value');
7876
}
7977

8078
public function testModes()

0 commit comments

Comments
 (0)