1 | <?php |
||
24 | class Counter extends Repository |
||
25 | { |
||
26 | public function __construct(Project $model) |
||
30 | |||
31 | /** |
||
32 | * Count number of open issue in the project. |
||
33 | * |
||
34 | * @return int |
||
35 | */ |
||
36 | public function countOpenIssues(UserInterface $limitByUser = null) |
||
40 | |||
41 | /** |
||
42 | * Count number of closed issue in the project. |
||
43 | * |
||
44 | * @return int |
||
45 | */ |
||
46 | public function countClosedIssues(UserInterface $limitByUser = null) |
||
63 | |||
64 | public function countNotes() |
||
68 | |||
69 | /** |
||
70 | * Count number of assigned issues in a project. |
||
71 | * |
||
72 | * @param UserInterface $forUser |
||
73 | * |
||
74 | * @return int |
||
75 | */ |
||
76 | public function countAssignedIssues(UserInterface $forUser) |
||
82 | |||
83 | /** |
||
84 | * Count number of private projects. |
||
85 | * |
||
86 | * @return int |
||
87 | */ |
||
88 | public function countPrivateProjects() |
||
92 | |||
93 | /** |
||
94 | * Count number of open projects. |
||
95 | * |
||
96 | * @return int |
||
97 | */ |
||
98 | public function countActiveProjects() |
||
102 | |||
103 | /** |
||
104 | * Count number of archived projects. |
||
105 | * |
||
106 | * @return int |
||
107 | */ |
||
108 | public function countArchivedProjects() |
||
112 | |||
113 | /** |
||
114 | * Count number of archived projects. |
||
115 | * |
||
116 | * @return int |
||
117 | */ |
||
118 | public function countProjectsByStatus($status) |
||
126 | |||
127 | //'active_projects' => $project->countActiveProjects(), |
||
128 | //'archived_projects' => $project->countArchivedProjects(), |
||
129 | // |
||
130 | |||
131 | // |
||
132 | |||
133 | // /** |
||
134 | // * For eager loading: count number of issues. |
||
135 | // * |
||
136 | // * @return Eloquent\Relations\HasOne |
||
137 | // */ |
||
138 | // public function issuesCount() |
||
139 | // { |
||
140 | // return $this->issues() |
||
141 | // ->selectRaw('project_id, count(*) as aggregate') |
||
142 | // ->groupBy('project_id'); |
||
143 | // } |
||
144 | // |
||
145 | |||
146 | // |
||
147 | // |
||
148 | // |
||
149 | // /** |
||
150 | // * Return projects with count of open & closed issues. |
||
151 | // * |
||
152 | // * @param array $projectIds |
||
153 | // * |
||
154 | // * @return Eloquent\Collection |
||
155 | // */ |
||
156 | // public function projectsWithCountIssues(array $projectIds) |
||
157 | // { |
||
158 | // return $this |
||
159 | // ->with('openIssuesCount', 'closedIssuesCount') |
||
160 | // ->whereIn('id', $projectIds) |
||
161 | // ->get(); |
||
162 | // } |
||
163 | } |
||
164 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..