| 1 | <?php |
||
| 10 | class LetStarHandler implements ExpHandler |
||
| 11 | { |
||
| 12 | |||
| 13 | |||
| 14 | private $letStarSymbol; |
||
| 15 | private $letSymbol; |
||
| 16 | |||
| 17 | 2 | public function __construct() |
|
| 22 | |||
| 23 | 1 | public function handles($program): bool |
|
| 27 | |||
| 28 | 1 | public function generateLet($program) |
|
| 46 | |||
| 47 | 1 | public function evaluate($program, Env\EnvInterface $env, Evaluator $evaluate) |
|
| 51 | } |
This checks looks for assignemnts to variables using the
list(...)function, where not all assigned variables are subsequently used.Consider the following code example.
Only the variables
$aand$care used. There was no need to assign$b.Instead, the list call could have been.