Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
28 | public function mutate(Handler $ajax): Handler |
||
29 | { |
||
30 | /** @var AjaxCallback[] $callbacks */ |
||
31 | $callbacks = $this->session->get(self::SESSION_KEY, []); |
||
32 | uasort($callbacks, [$this, 'sortByPriority']); |
||
33 | |||
34 | foreach ($callbacks as $callback) { |
||
35 | $ajax->callback($callback->getFunction(), $callback->getParameters()); |
||
36 | } |
||
37 | |||
38 | $this->session->remove(self::SESSION_KEY); |
||
39 | |||
40 | return $ajax; |
||
41 | } |
||
57 |