Conditions | 2 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
27 | private function waterfall (array $tasks, array $args) |
||
28 | { |
||
29 | $index = 0; |
||
30 | |||
31 | $next = function () use (&$index, &$tasks, &$next, &$args) { |
||
32 | if ($index == count($tasks)) { |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | $callback = $this->callOnce(function () use (&$next) { |
||
37 | $next(); |
||
38 | }); |
||
39 | |||
40 | $tasks[$index++]($callback, ...$args); |
||
41 | }; |
||
42 | |||
43 | $next(); |
||
44 | } |
||
45 | } |
It seems like you are assigning to a variable which was imported through a
use
statement which was not imported by reference.For clarity, we suggest to use a different name or import by reference depending on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
Change visible in outer-scope