@@ -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