| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | public function execute($command, callable $next) |
||
| 28 | { |
||
| 29 | if (!$command->storage) { |
||
| 30 | throw new \LogicException("Require storage before using this StoragePersistMiddleware!"); |
||
| 31 | } |
||
| 32 | |||
| 33 | $command->storage->setLineCommandData($command->getData()); |
||
| 34 | |||
| 35 | Manager::persist($command->storage); |
||
| 36 | Manager::flush(); |
||
| 37 | |||
| 38 | return $next($command); |
||
| 39 | } |
||
| 41 |