Skip to content

Commit 4afaaf9

Browse files
committed
Apply fixes from StyleCI
1 parent 4fca25f commit 4afaaf9

17 files changed

+99
-99
lines changed

lib/Github/Api/Issue/Labels.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public function deleteLabel($username, $repository, $label)
108108
public function update($username, $repository, $label, $newName, $color)
109109
{
110110
$params = [
111-
'name' => $newName,
111+
'name' => $newName,
112112
'color' => $color,
113113
];
114114

lib/Github/Api/Issue/Milestones.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ public function all($username, $repository, array $params = [])
3636
}
3737

3838
return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones', array_merge([
39-
'page' => 1,
40-
'state' => 'open',
41-
'sort' => 'due_date',
39+
'page' => 1,
40+
'state' => 'open',
41+
'sort' => 'due_date',
4242
'direction' => 'asc',
4343
], $params));
4444
}

lib/Github/Api/Repo.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -204,14 +204,14 @@ public function create(
204204
$path = null !== $organization ? '/orgs/'.$organization.'/repos' : '/user/repos';
205205

206206
$parameters = [
207-
'name' => $name,
208-
'description' => $description,
209-
'homepage' => $homepage,
210-
'private' => ($visibility ?? ($public ? 'public' : 'private')) === 'private',
211-
'has_issues' => $hasIssues,
212-
'has_wiki' => $hasWiki,
207+
'name' => $name,
208+
'description' => $description,
209+
'homepage' => $homepage,
210+
'private' => ($visibility ?? ($public ? 'public' : 'private')) === 'private',
211+
'has_issues' => $hasIssues,
212+
'has_wiki' => $hasWiki,
213213
'has_downloads' => $hasDownloads,
214-
'auto_init' => $autoInit,
214+
'auto_init' => $autoInit,
215215
'has_projects' => $hasProjects,
216216
];
217217

lib/Github/Api/Repository/Contents.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ public function update($username, $repository, $path, $content, $message, $sha,
181181
$parameters = [
182182
'content' => base64_encode($content),
183183
'message' => $message,
184-
'sha' => $sha,
184+
'sha' => $sha,
185185
];
186186

187187
if (null !== $branch) {
@@ -221,7 +221,7 @@ public function rm($username, $repository, $path, $message, $sha, $branch = null
221221

222222
$parameters = [
223223
'message' => $message,
224-
'sha' => $sha,
224+
'sha' => $sha,
225225
];
226226

227227
if (null !== $branch) {

test/Github/Tests/Api/CurrentUser/MembershipsTest.php

+9-9
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,21 @@ public function shouldGetMemberships()
1515
[
1616
'organization' => [
1717
'login' => 'octocat',
18-
'id' => 1,
18+
'id' => 1,
1919
],
20-
'user' => [
20+
'user' => [
2121
'login' => 'defunkt',
22-
'id' => 3,
22+
'id' => 3,
2323
],
2424
],
2525
[
2626
'organization' => [
2727
'login' => 'invitocat',
28-
'id' => 2,
28+
'id' => 2,
2929
],
30-
'user' => [
30+
'user' => [
3131
'login' => 'defunkt',
32-
'id' => 3,
32+
'id' => 3,
3333
],
3434
],
3535
];
@@ -51,11 +51,11 @@ public function shouldGetMembershipsForOrganization()
5151
$expectedValue = [
5252
'organization' => [
5353
'login' => 'invitocat',
54-
'id' => 2,
54+
'id' => 2,
5555
],
56-
'user' => [
56+
'user' => [
5757
'login' => 'defunkt',
58-
'id' => 3,
58+
'id' => 3,
5959
],
6060
];
6161

test/Github/Tests/Api/GistsTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ public function shouldUpdateGist()
227227
'files' => [
228228
'filename.txt' => [
229229
'filename' => 'new_name.txt',
230-
'content' => 'content',
230+
'content' => 'content',
231231
],
232232
'filename_new.txt' => [
233-
'content' => 'content new',
233+
'content' => 'content new',
234234
],
235235
],
236236
];

test/Github/Tests/Api/GitData/TreesTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ public function shouldCreateTreeUsingSha()
3535
'path' => 'path',
3636
'mode' => 'mode',
3737
'type' => 'type',
38-
'sha' => '1234',
38+
'sha' => '1234',
3939
],
4040
[
4141
'path' => 'htap',
4242
'mode' => 'edom',
4343
'type' => 'epyt',
44-
'sha' => '4321',
44+
'sha' => '4321',
4545
],
4646
],
4747
];
@@ -118,7 +118,7 @@ public function shouldNotCreateTreeWithoutPathParam()
118118
'tree' => [
119119
'mode' => 'mode',
120120
'type' => 'type',
121-
'content' => 'content',
121+
'content' => 'content',
122122
],
123123
];
124124

@@ -139,7 +139,7 @@ public function shouldNotCreateTreeWithoutModeParam()
139139
'tree' => [
140140
'path' => 'path',
141141
'type' => 'type',
142-
'content' => 'content',
142+
'content' => 'content',
143143
],
144144
];
145145

@@ -160,7 +160,7 @@ public function shouldNotCreateTreeWithoutTypeParam()
160160
'tree' => [
161161
'path' => 'path',
162162
'mode' => 'mode',
163-
'content' => 'content',
163+
'content' => 'content',
164164
],
165165
];
166166

test/Github/Tests/Api/GraphQLTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public function shouldTestGraphQL()
1313

1414
$api->expects($this->once())
1515
->method('post')
16-
->with($this->equalTo('/graphql'), $this->equalTo(['query'=>'bar']))
16+
->with($this->equalTo('/graphql'), $this->equalTo(['query' => 'bar']))
1717
->will($this->returnValue('foo'));
1818

1919
$result = $api->execute('bar');
@@ -44,7 +44,7 @@ public function shouldJSONEncodeGraphQLVariables()
4444
$api->expects($this->once())
4545
->method('post')
4646
->with('/graphql', $this->equalTo([
47-
'query'=>'bar',
47+
'query' => 'bar',
4848
'variables' => '{"variable":"foo"}',
4949
]));
5050

test/Github/Tests/Api/IssueTest.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ public function shouldGetIssuesUsingAdditionalParameters()
3535
$data = [
3636
'state' => 'open',
3737
'milestone' => '*',
38-
'assignee' => 'l3l0',
38+
'assignee' => 'l3l0',
3939
'mentioned' => 'l3l0',
40-
'labels' => 'bug,@high',
41-
'sort' => 'created',
40+
'labels' => 'bug,@high',
41+
'sort' => 'created',
4242
'direction' => 'asc',
4343
];
4444
$sentData = $data + [
@@ -77,7 +77,7 @@ public function shouldCreateIssue()
7777
{
7878
$data = [
7979
'title' => 'some title',
80-
'body' => 'some body',
80+
'body' => 'some body',
8181
];
8282

8383
$api = $this->getApiMock();
@@ -95,7 +95,7 @@ public function shouldNotCreateIssueWithoutTitle()
9595
{
9696
$this->expectException(MissingArgumentException::class);
9797
$data = [
98-
'body' => 'some body',
98+
'body' => 'some body',
9999
];
100100

101101
$api = $this->getApiMock();

test/Github/Tests/Api/PullRequestTest.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,10 @@ public function shouldMergePullRequestWithMergeMethod()
243243
public function shouldCreatePullRequestUsingTitle()
244244
{
245245
$data = [
246-
'base' => 'master',
247-
'head' => 'virtualtestbranch',
246+
'base' => 'master',
247+
'head' => 'virtualtestbranch',
248248
'title' => 'TITLE: Testing pull-request creation from PHP Github API',
249-
'body' => 'BODY: Testing pull-request creation from PHP Github API',
249+
'body' => 'BODY: Testing pull-request creation from PHP Github API',
250250
];
251251

252252
$api = $this->getApiMock();
@@ -263,8 +263,8 @@ public function shouldCreatePullRequestUsingTitle()
263263
public function shouldCreatePullRequestUsingIssueId()
264264
{
265265
$data = [
266-
'base' => 'master',
267-
'head' => 'virtualtestbranch',
266+
'base' => 'master',
267+
'head' => 'virtualtestbranch',
268268
'issue' => 25,
269269
];
270270

@@ -282,10 +282,10 @@ public function shouldCreatePullRequestUsingIssueId()
282282
public function shouldCreateDraftPullRequest()
283283
{
284284
$data = [
285-
'base' => 'master',
286-
'head' => 'virtualtestbranch',
285+
'base' => 'master',
286+
'head' => 'virtualtestbranch',
287287
'title' => 'TITLE: Testing draft pull-request creation from PHP Github API',
288-
'body' => 'BODY: Testing draft pull-request creation from PHP Github API',
288+
'body' => 'BODY: Testing draft pull-request creation from PHP Github API',
289289
'draft' => 'true',
290290
];
291291

@@ -304,9 +304,9 @@ public function shouldNotCreatePullRequestWithoutBase()
304304
{
305305
$this->expectException(MissingArgumentException::class);
306306
$data = [
307-
'head' => 'virtualtestbranch',
307+
'head' => 'virtualtestbranch',
308308
'title' => 'TITLE: Testing pull-request creation from PHP Github API',
309-
'body' => 'BODY: Testing pull-request creation from PHP Github API',
309+
'body' => 'BODY: Testing pull-request creation from PHP Github API',
310310
];
311311

312312
$api = $this->getApiMock();
@@ -323,9 +323,9 @@ public function shouldNotCreatePullRequestWithoutHead()
323323
{
324324
$this->expectException(MissingArgumentException::class);
325325
$data = [
326-
'base' => 'master',
326+
'base' => 'master',
327327
'title' => 'TITLE: Testing pull-request creation from PHP Github API',
328-
'body' => 'BODY: Testing pull-request creation from PHP Github API',
328+
'body' => 'BODY: Testing pull-request creation from PHP Github API',
329329
];
330330

331331
$api = $this->getApiMock();
@@ -342,8 +342,8 @@ public function shouldNotCreatePullRequestUsingTitleButWithoutBody()
342342
{
343343
$this->expectException(MissingArgumentException::class);
344344
$data = [
345-
'base' => 'master',
346-
'head' => 'virtualtestbranch',
345+
'base' => 'master',
346+
'head' => 'virtualtestbranch',
347347
'title' => 'TITLE: Testing pull-request creation from PHP Github API',
348348
];
349349

test/Github/Tests/Api/RepoTest.php

+30-30
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ public function shouldCreateRepositoryUsingNameOnly()
9292
$api->expects($this->once())
9393
->method('post')
9494
->with('/user/repos', [
95-
'name' => 'l3l0Repo',
96-
'description' => '',
97-
'homepage' => '',
98-
'private' => false,
99-
'has_issues' => false,
100-
'has_wiki' => false,
95+
'name' => 'l3l0Repo',
96+
'description' => '',
97+
'homepage' => '',
98+
'private' => false,
99+
'has_issues' => false,
100+
'has_wiki' => false,
101101
'has_downloads' => false,
102-
'auto_init' => false,
102+
'auto_init' => false,
103103
'has_projects' => true,
104104
])
105105
->will($this->returnValue($expectedArray));
@@ -118,14 +118,14 @@ public function shouldCreateRepositoryForOrganization()
118118
$api->expects($this->once())
119119
->method('post')
120120
->with('/orgs/KnpLabs/repos', [
121-
'name' => 'KnpLabsRepo',
122-
'description' => '',
123-
'homepage' => '',
124-
'private' => false,
125-
'has_issues' => false,
126-
'has_wiki' => false,
121+
'name' => 'KnpLabsRepo',
122+
'description' => '',
123+
'homepage' => '',
124+
'private' => false,
125+
'has_issues' => false,
126+
'has_wiki' => false,
127127
'has_downloads' => false,
128-
'auto_init' => false,
128+
'auto_init' => false,
129129
'has_projects' => true,
130130
])
131131
->will($this->returnValue($expectedArray));
@@ -144,16 +144,16 @@ public function shouldCreateRepositoryWithInternalVisibility()
144144
$api->expects($this->once())
145145
->method('post')
146146
->with('/user/repos', [
147-
'name' => 'KnpLabsRepo',
148-
'description' => '',
149-
'homepage' => '',
150-
'has_issues' => false,
151-
'has_wiki' => false,
147+
'name' => 'KnpLabsRepo',
148+
'description' => '',
149+
'homepage' => '',
150+
'has_issues' => false,
151+
'has_wiki' => false,
152152
'has_downloads' => false,
153-
'auto_init' => false,
154-
'has_projects' => true,
155-
'visibility' => 'internal',
156-
'private' => false,
153+
'auto_init' => false,
154+
'has_projects' => true,
155+
'visibility' => 'internal',
156+
'private' => false,
157157
])
158158
->will($this->returnValue($expectedArray));
159159

@@ -389,14 +389,14 @@ public function shouldCreateUsingAllParams()
389389
$api->expects($this->once())
390390
->method('post')
391391
->with('/user/repos', [
392-
'name' => 'l3l0Repo',
393-
'description' => 'test',
394-
'homepage' => 'http://l3l0.eu',
395-
'private' => true,
396-
'has_issues' => false,
397-
'has_wiki' => false,
392+
'name' => 'l3l0Repo',
393+
'description' => 'test',
394+
'homepage' => 'http://l3l0.eu',
395+
'private' => true,
396+
'has_issues' => false,
397+
'has_wiki' => false,
398398
'has_downloads' => false,
399-
'auto_init' => false,
399+
'auto_init' => false,
400400
'has_projects' => true,
401401
])
402402
->will($this->returnValue($expectedArray));

0 commit comments

Comments
 (0)