| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 52 | public function create(Webhook $webhook): self |
||
| 53 | { |
||
| 54 | $webhook->setRequired([ |
||
| 55 | 'endpoint', |
||
| 56 | 'events', |
||
| 57 | ]); |
||
| 58 | |||
| 59 | // Set HTTP params |
||
| 60 | $this->type = 'post'; |
||
| 61 | $this->endpoint = '/webhooks'; |
||
| 62 | $this->params = $webhook; |
||
| 63 | $this->response = Webhook::class; |
||
| 64 | |||
| 65 | return $this; |
||
| 66 | } |
||
| 106 |