| Total Complexity | 7 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class ApiKeysRepository |
||
| 8 | { |
||
| 9 | public static function incrementHit($serverSecret) |
||
| 12 | } |
||
| 13 | |||
| 14 | public static function getSecretKeys() |
||
| 15 | { |
||
| 16 | return self::table()->where('status', 'active')->pluck('Secretkey'); |
||
| 17 | } |
||
| 18 | |||
| 19 | public static function get() |
||
| 20 | { |
||
| 21 | return self::table()->get(); |
||
| 22 | } |
||
| 23 | |||
| 24 | public static function deleteById($id) |
||
| 25 | { |
||
| 26 | return self::table()->where('id', $id)->delete(); |
||
| 27 | } |
||
| 28 | |||
| 29 | public static function updateById($status, $id) |
||
| 30 | { |
||
| 31 | return self::table()->where('id', $id)->update(['status' => $status]); |
||
| 32 | } |
||
| 33 | |||
| 34 | public static function insertGetId($token) |
||
| 41 | ]); |
||
| 42 | } |
||
| 43 | |||
| 44 | private static function table() |
||
| 47 | } |
||
| 48 | } |