final protected getOptionalArgumentAt ( $index, |
||
$methodExpression |
protected final function getOptionalArgumentAt($index, O\MethodCallExpression $methodExpression)
{
$argumentExpressions = $methodExpression->getArguments();
if (isset($argumentExpressions[$index])) {
if ($argumentExpressions[$index]->isUnpacked()) {
throw new PinqException('Cannot get argument from method call %s at index %d: argument unpacking is not supported', $methodExpression->getName()->compileDebug(), $index);
}
return $argumentExpressions[$index]->getValue();
} else {
return null;
}
}