Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | public function createFromHttpRequest(RequestInterface $request) |
||
11 | { |
||
12 | $params = $request->getParams(); |
||
13 | |||
14 | if (empty($params['command_name'])) { |
||
15 | throw new \InvalidArgumentException('missing required param: command_name'); |
||
16 | } |
||
17 | |||
18 | return new CreateCommandScheduleRequest( |
||
19 | $params['command_name'], |
||
20 | $params['command_params'] ?? [] |
||
21 | ); |
||
24 |