| 1 | <?php |
||
| 18 | class Counter extends Repository |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var User |
||
| 22 | */ |
||
| 23 | protected $model; |
||
| 24 | |||
| 25 | public function __construct(User $model) |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Count active users. |
||
| 32 | * |
||
| 33 | * @return int |
||
| 34 | */ |
||
| 35 | public function countNotDeleted() |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Count deleted users. |
||
| 42 | * |
||
| 43 | * @return int |
||
| 44 | */ |
||
| 45 | public function countDeleted() |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Count number of created issues in a project. |
||
| 52 | * |
||
| 53 | * @param int $projectId |
||
| 54 | * |
||
| 55 | * @return int |
||
| 56 | */ |
||
| 57 | public function createdIssuesCount($projectId = 0) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * Count number of archived projects. |
||
| 71 | * |
||
| 72 | * @param $status |
||
| 73 | * |
||
| 74 | * @return int |
||
| 75 | */ |
||
| 76 | public function countProjectsByStatus($status) |
||
| 84 | } |
||
| 85 |