Skip to content

Commit

Permalink
Merge 6cbe833 into ef6b7e6
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoaguilera committed Sep 26, 2020
2 parents ef6b7e6 + 6cbe833 commit cd6127c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Parser/CommandInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ protected function findExistingOption($optionName)

/**
* Examine the parameters of the method for this command, and
* build a list of commandline arguements for them.
* build a list of commandline arguments for them.
*
* @return array
*/
Expand All @@ -651,9 +651,9 @@ protected function determineAgumentClassifications()
if ($this->lastParameterIsOptionsArray()) {
array_pop($params);
}
while (!empty($params) && ($params[0]->getClass() != null)) {
while (!empty($params) && ($params[0]->getType() != null) && !($params[0]->getType()->isBuiltin())) {
$param = array_shift($params);
$injectedClass = $param->getClass()->getName();
$injectedClass = $param->getType()->getName();
array_unshift($this->injectedClasses, $injectedClass);
}
foreach ($params as $param) {
Expand All @@ -670,8 +670,8 @@ protected function determineAgumentClassifications()
protected function addParameterToResult($result, $param)
{
// Commandline arguments must be strings, so ignore any
// parameter that is typehinted to any non-primative class.
if ($param->getClass() != null) {
// parameter that is typehinted to any non-primitive class.
if ($param->getType() && !$param->getType()->isBuiltin()) {
return;
}
$result->add($param->name);
Expand Down

0 comments on commit cd6127c

Please sign in to comment.