Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
92 | private function buildRoute(string $message): Route |
||
93 | { |
||
94 | $icon = $this->level === static::HOOK_LEVEL_ERROR ? 'error' : $this->level; |
||
95 | |||
96 | $route = Route::post($this->hookId) |
||
97 | ->toWebhook() |
||
98 | ->withBody('message', $message) |
||
99 | ->withBody('errorLevel', $this->level); |
||
100 | |||
101 | if ($this->icon !== null) { |
||
102 | $route->withBody('icon', $icon); |
||
103 | } |
||
104 | |||
105 | return $route; |
||
106 | } |
||
107 | } |