| Conditions | 5 |
| Paths | 4 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 88 | public function can(StatefulInterface $stateful, array $parameters = []): bool |
||
| 89 | { |
||
| 90 | foreach ($this->fromStates as $state) { |
||
| 91 | if ($state->getName() === $stateful->getState()) { |
||
| 92 | if (!is_null($this->checker) && !(bool) call_user_func($this->checker, $stateful, $parameters)) { |
||
| 93 | return false; |
||
| 94 | } |
||
| 95 | |||
| 96 | return true; |
||
| 97 | } |
||
| 98 | } |
||
| 99 | |||
| 100 | return false; |
||
| 101 | } |
||
| 103 |