Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
13 | class GetUserStats |
||
14 | { |
||
15 | protected $userID; |
||
16 | |||
17 | 10 | public function __construct($userID) |
|
20 | 10 | } |
|
21 | |||
22 | // Get all Customer Favorites assigned to the user |
||
23 | 4 | public function getUserCustomerFavs() |
|
29 | } |
||
30 | |||
31 | // Get all Tech Tip Favorites assigned to the user |
||
32 | 4 | public function getUserTipFavs() |
|
38 | } |
||
39 | |||
40 | // Get a count of acctive file links the user has |
||
41 | 4 | public function getUserActiveLinks() |
|
42 | { |
||
43 | 4 | $activeLinks = FileLinks::where('user_id', $this->userID)->where('expire', '>', Carbon::now())->count(); |
|
44 | 4 | Log::debug('Retrieved count of active File Links for User ID'.$this->userID.'. Data - ', ['Active Links' => $activeLinks]); |
|
45 | |||
46 | 4 | return $activeLinks; |
|
47 | } |
||
48 | |||
49 | // Get the total count of file links the user has |
||
50 | 4 | public function getUserTotalLinks() |
|
56 | } |
||
57 | } |
||
58 |