Total Complexity | 3 |
Total Lines | 50 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
12 | class UserRepository |
||
13 | { |
||
14 | /** |
||
15 | * Retrieve the table name. |
||
16 | * |
||
17 | * @return string |
||
18 | */ |
||
19 | public function table() |
||
20 | { |
||
21 | return Auth::getProvider() |
||
22 | ->createModel() |
||
23 | ->getTable(); |
||
24 | } |
||
25 | |||
26 | /** |
||
27 | * Create a new query. |
||
28 | * |
||
29 | * @return \Illuminate\Database\Query\Builder |
||
30 | */ |
||
31 | public function query() |
||
32 | { |
||
33 | return Auth::getProvider() |
||
34 | ->createModel() |
||
35 | ->newQuery(); |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Make a query using a temporary table. |
||
40 | * |
||
41 | * @param string $name |
||
42 | * @param \Closure $table |
||
43 | * @param array $data |
||
44 | * @param \Closure $query |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | public function withTemporaryTable(string $name, \Closure $table, array $data, \Closure $query) |
||
62 | } |
||
63 | } |