Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
36 | public static function createFromIlluminateRequest(IlluminateRequest $illuminateRequest): Request |
||
37 | { |
||
38 | return collect([ |
||
39 | 'token', |
||
40 | 'teamId', |
||
41 | 'teamDomain', |
||
42 | 'channelId', |
||
43 | 'channelName', |
||
44 | 'userId', |
||
45 | 'userName', |
||
46 | 'command', |
||
47 | 'text', |
||
48 | 'responseUrl', |
||
49 | ])->reduce(function (Request $request, string $propertyName) use ($illuminateRequest) { |
||
50 | $request->$propertyName = $illuminateRequest->get(snake_case($propertyName)); |
||
51 | return $request; |
||
52 | }, new static()); |
||
53 | } |
||
54 | |||
65 |