Skip to content

Commit

Permalink
redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan committed Nov 9, 2016
1 parent 4c2060d commit ba476a3
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/Commando/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class Command implements \ArrayAccess, \Iterator
'repeatable' => 'increment',
'repeats' => 'increment',
'count' => 'increment',
'i' => 'increment',

'must' => 'must',
// mustBeNumeric
Expand Down Expand Up @@ -522,15 +521,15 @@ public function parse()
$this->sorted_keys = array_keys($this->options);
natsort($this->sorted_keys);

// See if our options have what they require
foreach ($this->options as $option) {
$needs = $option->hasNeeds($keyvals);
if ($needs !== true) {
throw new \InvalidArgumentException(
'Option "'.$option->getName().'" does not have required option(s): '.implode(', ', $needs)
);
}
}
// // See if our options have what they require
// foreach ($this->options as $option) {
// $needs = $option->hasNeeds($keyvals);
// if ($needs !== true) {
// throw new \InvalidArgumentException(
// 'Option "'.$option->getName().'" does not have required option(s): '.implode(', ', $needs)
// );
// }
// }
} catch(\Exception $e) {
$this->error($e);
}
Expand Down

0 comments on commit ba476a3

Please sign in to comment.