@@ -51,7 +51,7 @@ class GetOpt implements \Countable, \ArrayAccess, \IteratorAggregate
5151 protected $ commands = [];
5252
5353 /** The command that is executed determined by process
54- * @var CommandInterdface */
54+ * @var CommandInterface */
5555 protected $ command ;
5656
5757 /** @var string[] */
@@ -280,7 +280,7 @@ public function addCommand(CommandInterface $command)
280280 * Get the current or a named command.
281281 *
282282 * @param string $name
283- * @return Command
283+ * @return CommandInterface
284284 */
285285 public function getCommand ($ name = null )
286286 {
@@ -292,7 +292,7 @@ public function getCommand($name = null)
292292 }
293293
294294 /**
295- * @return Command []
295+ * @return CommandInterface []
296296 */
297297 public function getCommands ()
298298 {
@@ -500,6 +500,12 @@ public function parse($arguments = null)
500500
501501 // array functions
502502
503+ /**
504+ * @inheritDoc
505+ *
506+ * @return \Traversable
507+ * @throws \Exception
508+ */
503509 public function getIterator ()
504510 {
505511 $ result = [];
@@ -514,6 +520,12 @@ public function getIterator()
514520 return new \ArrayIterator ($ result + $ this ->additionalOptions );
515521 }
516522
523+ /**
524+ * @inheritDoc
525+ *
526+ * @param mixed $offset
527+ * @return bool
528+ */
517529 public function offsetExists ($ offset )
518530 {
519531 $ option = $ this ->getOptionObject ($ offset );
@@ -524,6 +536,12 @@ public function offsetExists($offset)
524536 return isset ($ this ->additionalOptions [$ offset ]);
525537 }
526538
539+ /**
540+ * @inheritDoc
541+ *
542+ * @param mixed $offset
543+ * @return mixed
544+ */
527545 public function offsetGet ($ offset )
528546 {
529547 $ option = $ this ->getOptionObject ($ offset );
@@ -534,16 +552,34 @@ public function offsetGet($offset)
534552 return isset ($ this ->additionalOptions [$ offset ]) ? $ this ->additionalOptions [$ offset ] : null ;
535553 }
536554
555+ /**
556+ * @inheritDoc
557+ *
558+ * @param mixed $offset
559+ * @param mixed $value
560+ */
537561 public function offsetSet ($ offset , $ value )
538562 {
539563 throw new \LogicException ('Read only array access ' );
540564 }
541565
566+ /**
567+ * @inheritDoc
568+ *
569+ * @param mixed $offset
570+ * @throws \LogicException
571+ */
542572 public function offsetUnset ($ offset )
543573 {
544574 throw new \LogicException ('Read only array access ' );
545575 }
546576
577+ /**
578+ * @inheritDoc
579+ *
580+ * @return int
581+ * @throws \Exception
582+ */
547583 public function count ()
548584 {
549585 return $ this ->getIterator ()->count ();
0 commit comments