@@ 78-90 (lines=13) @@ | ||
75 | return $argument; |
|
76 | } |
|
77 | ||
78 | final protected function getOptionalArgumentValueAt( |
|
79 | $index, |
|
80 | O\MethodCallExpression $methodExpression, |
|
81 | $default = null |
|
82 | ) { |
|
83 | $argumentExpression = $this->getOptionalArgumentAt($index, $methodExpression); |
|
84 | ||
85 | if ($argumentExpression === null) { |
|
86 | return $default; |
|
87 | } |
|
88 | ||
89 | return $argumentExpression->evaluate($this->evaluationContext); |
|
90 | } |
|
91 | ||
92 | final protected function getArgumentAt($index, O\MethodCallExpression $methodExpression) |
|
93 | { |
|
@@ 92-104 (lines=13) @@ | ||
89 | return $argumentExpression->evaluate($this->evaluationContext); |
|
90 | } |
|
91 | ||
92 | final protected function getArgumentAt($index, O\MethodCallExpression $methodExpression) |
|
93 | { |
|
94 | $argumentExpression = $this->getOptionalArgumentAt($index, $methodExpression); |
|
95 | ||
96 | if ($argumentExpression === null) { |
|
97 | throw new PinqException( |
|
98 | 'Could not get argument at index %d of method %s: argument not supplied', |
|
99 | $index, |
|
100 | $methodExpression->getName()->compileDebug()); |
|
101 | } |
|
102 | ||
103 | return $argumentExpression; |
|
104 | } |
|
105 | ||
106 | final protected function getOptionalArgumentAt($index, O\MethodCallExpression $methodExpression) |
|
107 | { |