Skip to content

Commit ac74c8a

Browse files
Allow default null
1 parent 0bc922c commit ac74c8a

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

src/Api/AbstractApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ abstract class AbstractApi implements ApiInterface
5050
*
5151
* @return void
5252
*/
53-
public function __construct(Client $client, ?int $perPage)
53+
public function __construct(Client $client, int $perPage = null)
5454
{
5555
if (null !== $perPage && ($perPage < 1 || $perPage > 100)) {
5656
throw new ValueError(sprintf('%s::__construct(): Argument #2 ($perPage) must be between 1 and 100, or null', self::class));

src/Client.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -107,199 +107,199 @@ public static function createWithHttpClient(ClientInterface $httpClient)
107107
*/
108108
public function deployKeys()
109109
{
110-
return new Api\DeployKeys($this, null);
110+
return new Api\DeployKeys($this);
111111
}
112112

113113
/**
114114
* @return Api\Deployments
115115
*/
116116
public function deployments()
117117
{
118-
return new Api\Deployments($this, null);
118+
return new Api\Deployments($this);
119119
}
120120

121121
/**
122122
* @return Api\Environments
123123
*/
124124
public function environments()
125125
{
126-
return new Api\Environments($this, null);
126+
return new Api\Environments($this);
127127
}
128128

129129
/**
130130
* @return Api\Groups
131131
*/
132132
public function groups()
133133
{
134-
return new Api\Groups($this, null);
134+
return new Api\Groups($this);
135135
}
136136

137137
/**
138138
* @return Api\GroupsBoards
139139
*/
140140
public function groupsBoards()
141141
{
142-
return new Api\GroupsBoards($this, null);
142+
return new Api\GroupsBoards($this);
143143
}
144144

145145
/**
146146
* @return Api\GroupsMilestones
147147
*/
148148
public function groupsMilestones()
149149
{
150-
return new Api\GroupsMilestones($this, null);
150+
return new Api\GroupsMilestones($this);
151151
}
152152

153153
/**
154154
* @return Api\IssueBoards
155155
*/
156156
public function issueBoards()
157157
{
158-
return new Api\IssueBoards($this, null);
158+
return new Api\IssueBoards($this);
159159
}
160160

161161
/**
162162
* @return Api\IssueLinks
163163
*/
164164
public function issueLinks()
165165
{
166-
return new Api\IssueLinks($this, null);
166+
return new Api\IssueLinks($this);
167167
}
168168

169169
/**
170170
* @return Api\Issues
171171
*/
172172
public function issues()
173173
{
174-
return new Api\Issues($this, null);
174+
return new Api\Issues($this);
175175
}
176176

177177
/**
178178
* @return Api\IssuesStatistics
179179
*/
180180
public function issuesStatistics()
181181
{
182-
return new Api\IssuesStatistics($this, null);
182+
return new Api\IssuesStatistics($this);
183183
}
184184

185185
/**
186186
* @return Api\Jobs
187187
*/
188188
public function jobs()
189189
{
190-
return new Api\Jobs($this, null);
190+
return new Api\Jobs($this);
191191
}
192192

193193
/**
194194
* @return Api\Keys
195195
*/
196196
public function keys()
197197
{
198-
return new Api\Keys($this, null);
198+
return new Api\Keys($this);
199199
}
200200

201201
/**
202202
* @return Api\MergeRequests
203203
*/
204204
public function mergeRequests()
205205
{
206-
return new Api\MergeRequests($this, null);
206+
return new Api\MergeRequests($this);
207207
}
208208

209209
/**
210210
* @return Api\Milestones
211211
*/
212212
public function milestones()
213213
{
214-
return new Api\Milestones($this, null);
214+
return new Api\Milestones($this);
215215
}
216216

217217
/**
218218
* @return Api\ProjectNamespaces
219219
*/
220220
public function namespaces()
221221
{
222-
return new Api\ProjectNamespaces($this, null);
222+
return new Api\ProjectNamespaces($this);
223223
}
224224

225225
/**
226226
* @return Api\Projects
227227
*/
228228
public function projects()
229229
{
230-
return new Api\Projects($this, null);
230+
return new Api\Projects($this);
231231
}
232232

233233
/**
234234
* @return Api\Repositories
235235
*/
236236
public function repositories()
237237
{
238-
return new Api\Repositories($this, null);
238+
return new Api\Repositories($this);
239239
}
240240

241241
/**
242242
* @return Api\RepositoryFiles
243243
*/
244244
public function repositoryFiles()
245245
{
246-
return new Api\RepositoryFiles($this, null);
246+
return new Api\RepositoryFiles($this);
247247
}
248248

249249
/**
250250
* @return Api\Schedules
251251
*/
252252
public function schedules()
253253
{
254-
return new Api\Schedules($this, null);
254+
return new Api\Schedules($this);
255255
}
256256

257257
/**
258258
* @return Api\Snippets
259259
*/
260260
public function snippets()
261261
{
262-
return new Api\Snippets($this, null);
262+
return new Api\Snippets($this);
263263
}
264264

265265
/**
266266
* @return Api\SystemHooks
267267
*/
268268
public function systemHooks()
269269
{
270-
return new Api\SystemHooks($this, null);
270+
return new Api\SystemHooks($this);
271271
}
272272

273273
/**
274274
* @return Api\Users
275275
*/
276276
public function users()
277277
{
278-
return new Api\Users($this, null);
278+
return new Api\Users($this);
279279
}
280280

281281
/**
282282
* @return Api\Tags
283283
*/
284284
public function tags()
285285
{
286-
return new Api\Tags($this, null);
286+
return new Api\Tags($this);
287287
}
288288

289289
/**
290290
* @return Api\Version
291291
*/
292292
public function version()
293293
{
294-
return new Api\Version($this, null);
294+
return new Api\Version($this);
295295
}
296296

297297
/**
298298
* @return Api\Wiki
299299
*/
300300
public function wiki()
301301
{
302-
return new Api\Wiki($this, null);
302+
return new Api\Wiki($this);
303303
}
304304

305305
/**

0 commit comments

Comments
 (0)