| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function execute($command, callable $next) |
||
| 29 | { |
||
| 30 | $repository = Manager::getRepository(User::class); |
||
| 31 | |||
| 32 | if (!$user = $repository->findOneBy(['lineUserId' => $command->input->userId])) { |
||
| 33 | $user = new User(); |
||
| 34 | } |
||
| 35 | |||
| 36 | $command->storage = $user; |
||
| 37 | $command->merge((array) $user->getLineCommandData()); |
||
| 38 | |||
| 39 | $user->setLineUserId($command->input->userId); |
||
| 40 | $user->setLineActiveCmd($command->getCmd()); |
||
| 41 | |||
| 42 | return $next($command); |
||
| 43 | } |
||
| 45 |