8000 InputDefinition: corrected grammar mistakes and added a @throws decla… · lauris/symfony@c099763 · GitHub
[go: up one dir, main page]

Skip to content

Commit c099763

Browse files
committed
InputDefinition: corrected grammar mistakes and added a @throws declaration
1 parent 086ff48 commit c099763

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function addArguments($arguments = array())
113113
public function addArgument(InputArgument $argument)
114114
{
115115
if (isset($this->arguments[$argument->getName()])) {
116-
throw new \LogicException(sprintf('An argument with name "%s" already exist.', $argument->getName()));
116+
throw new \LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName()));
117117
}
118118

119119
if ($this->hasAnArrayArgument) {
@@ -262,9 +262,9 @@ public function addOptions($options = array())
262262
public function addOption(InputOption $option)
263263
{
264264
if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) {
265-
throw new \LogicException(sprintf('An option named "%s" already exist.', $option->getName()));
265+
throw new \LogicException(sprintf('An option named "%s" already exists.', $option->getName()));
266266
} elseif (isset($this->shortcuts[$option->getShortcut()]) && !$option->equals($this->options[$this->shortcuts[$option->getShortcut()]])) {
267-
throw new \LogicException(sprintf('An option with shortcut "%s" already exist.', $option->getShortcut()));
267+
throw new \LogicException(sprintf('An option with shortcut "%s" already exists.', $option->getShortcut()));
268268
}
269269

270270
$this->options[$option->getName()] = $option;
@@ -280,6 +280,8 @@ public function addOption(InputOption $option)
280280
*
281281
* @return InputOption A InputOption object
282282
*
283+
* @throws \InvalidArgumentException When option given doesn't exist
284+
*
283285
* @api
284286
*/
285287
public function getOption($name)

0 commit comments

Comments
 (0)
0