1 | <?php |
||
5 | class Project |
||
6 | { |
||
7 | |||
8 | /** |
||
9 | * @var Client |
||
10 | */ |
||
11 | private $client; |
||
12 | |||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $id; |
||
17 | |||
18 | /** |
||
19 | * @param Client $client |
||
20 | * @param int $id |
||
21 | */ |
||
22 | 63 | function __construct($client, $id) |
|
27 | |||
28 | /** |
||
29 | * Get the details of this project |
||
30 | * |
||
31 | * @return array |
||
32 | */ |
||
33 | public function get() |
||
37 | |||
38 | /** |
||
39 | * Get all the people associated with this project |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | 3 | public function people() |
|
47 | |||
48 | /** |
||
49 | * Get all the issues associated with this project |
||
50 | * |
||
51 | * @return array |
||
52 | */ |
||
53 | 3 | public function issues() |
|
57 | |||
58 | /** |
||
59 | * @param int $id |
||
60 | * |
||
61 | * @return Issue |
||
62 | */ |
||
63 | 27 | public function issue($id) |
|
67 | |||
68 | /** |
||
69 | * Get all the active issues associated with this project |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | 3 | public function activeIssues() |
|
79 | |||
80 | /** |
||
81 | * Get all the closed and fixed issues associated with this project |
||
82 | * |
||
83 | * @return array |
||
84 | */ |
||
85 | 3 | public function closedAndFixedIssues() |
|
91 | |||
92 | /** |
||
93 | * Get all the issues by a filter associated with this project |
||
94 | * |
||
95 | * @param int $filter |
||
96 | * |
||
97 | * @return array |
||
98 | */ |
||
99 | 3 | public function issuesByFilter($filter) |
|
109 | |||
110 | /** |
||
111 | * Get all the issues which are waiting on you, and are associated with |
||
112 | * this project |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | 3 | public function issuesWaitingOnYou() |
|
122 | |||
123 | /** |
||
124 | * Get all the issues which are waiting on them |
||
125 | * |
||
126 | * @return array |
||
127 | */ |
||
128 | 3 | public function issuesWaitingOnThem() |
|
134 | |||
135 | /** |
||
136 | * Get release builds of this project |
||
137 | * |
||
138 | * @return array |
||
139 | */ |
||
140 | 3 | public function releaseBuilds() |
|
144 | |||
145 | /** |
||
146 | * Get release builds of this project |
||
147 | * |
||
148 | * @return ReleaseBuildInfo |
||
149 | */ |
||
150 | public function releaseBuildInfo() |
||
154 | |||
155 | /** |
||
156 | * Get filters of this project |
||
157 | * |
||
158 | * @return array |
||
159 | */ |
||
160 | 3 | public function filters() |
|
164 | |||
165 | /** |
||
166 | * Add a new issue to the project |
||
167 | * |
||
168 | * @param Issue $issue |
||
169 | * |
||
170 | * @return array |
||
171 | */ |
||
172 | 3 | public function addIssue($issue) |
|
178 | |||
179 | /** |
||
180 | * Create a new release build for the project |
||
181 | * |
||
182 | * @param ReleaseBuild $releaseBuild |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | 3 | public function createReleaseBuild($releaseBuild) |
|
193 | |||
194 | } |
||
195 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.