Skip to content

Commit a3c6603

Browse files
Merge branch '2.7' into 2.8
* 2.7: [minor] SCA
2 parents 875f592 + be24d90 commit a3c6603

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ private function getInputOptionData(InputOption $option)
109109
{
110110
return array(
111111
'name' => '--'.$option->getName(),
112-
'shortcut' => $option->getShortcut() ? '-'.implode('|-', explode('|', $option->getShortcut())) : '',
112+
'shortcut' => $option->getShortcut() ? '-'.str_replace('|', '|-', $option->getShortcut()) : '',
113113
'accept_value' => $option->acceptValue(),
114114
'is_value_required' => $option->isValueRequired(),
115115
'is_multiple' => $option->isArray(),

Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function describeInputOption(InputOption $option, array $options = arr
5050
$this->write(
5151
'**'.$option->getName().':**'."\n\n"
5252
.'* Name: `--'.$option->getName().'`'."\n"
53-
.'* Shortcut: '.($option->getShortcut() ? '`-'.implode('|-', explode('|', $option->getShortcut())).'`' : '<none>')."\n"
53+
.'* Shortcut: '.($option->getShortcut() ? '`-'.str_replace('|', '|-', $option->getShortcut()).'`' : '<none>')."\n"
5454
.'* Accept value: '.($option->acceptValue() ? 'yes' : 'no')."\n"
5555
.'* Is value required: '.($option->isValueRequired() ? 'yes' : 'no')."\n"
5656
.'* Is multiple: '.($option->isArray() ? 'yes' : 'no')."\n"

Descriptor/XmlDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ private function getInputOptionDocument(InputOption $option)
223223
$pos = strpos($option->getShortcut(), '|');
224224
if (false !== $pos) {
225225
$objectXML->setAttribute('shortcut', '-'.substr($option->getShortcut(), 0, $pos));
226-
$objectXML->setAttribute('shortcuts', '-'.implode('|-', explode('|', $option->getShortcut())));
226+
$objectXML->setAttribute('shortcuts', '-'.str_replace('|', '|-', $option->getShortcut()));
227227
} else {
228228
$objectXML->setAttribute('shortcut', $option->getShortcut() ? '-'.$option->getShortcut() : '');
229229
}

Input/InputOption.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public function getDescription()
195195
*
196196
* @return bool
197197
*/
198-
public function equals(InputOption $option)
198+
public function equals(self $option)
199199
{
200200
return $option->getName() === $this->getName()
201201
&& $option->getShortcut() === $this->getShortcut()

0 commit comments

Comments
 (0)