| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class ProxyService implements ProxyServiceContract |
||
| 18 | { |
||
| 19 | public function getByUserId($userId) |
||
| 20 | { |
||
| 21 | return Proxy::where('user_id', $userId)->get(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function find($id): ?Proxy |
||
| 25 | { |
||
| 26 | if ($id instanceof Proxy) { |
||
| 27 | return $id; |
||
| 28 | } |
||
| 29 | |||
| 30 | return Proxy::find($id); |
||
|
|
|||
| 31 | } |
||
| 32 | |||
| 33 | public function update($id, $data): Proxy |
||
| 40 | } |
||
| 41 | |||
| 42 | public function create($data): Proxy |
||
| 48 | } |
||
| 49 | |||
| 50 | public function delete($id): bool |
||
| 51 | { |
||
| 52 | return $this->find($id)->delete(); |
||
| 53 | } |
||
| 54 | |||
| 55 | public function healthCheck($id, $data): void |
||
| 61 | ]); |
||
| 62 | } |
||
| 63 | } |
||
| 64 |