Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
28 | 1 | public function evaluate($program, Env\EnvInterface $env, Evaluator $evaluate) |
|
29 | { |
||
30 | // generate a lambda (eval the program *without* name) |
||
31 | // use that as the value in the define |
||
32 | // then call that |
||
33 | 1 | list($_let, $name, $bindings) = $program; |
|
34 | 1 | $body = \array_slice($program, 3); |
|
35 | 1 | $lambdaExp = array_merge([Symbol::make('lambda'), array_column($bindings, 0)], $body); |
|
36 | 1 | $defineExp = [Symbol::make('define'), $name, $lambdaExp]; |
|
37 | 1 | $evaluate($defineExp, $env); |
|
38 | 1 | return $evaluate(array_merge([$name], array_column($bindings, 1)), $env); |
|
39 | } |
||
40 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..