Skip to content

Commit 3090ce5

Browse files
Apply fixes from StyleCI (#545)
1 parent 6cc84a9 commit 3090ce5

18 files changed

+126
-79
lines changed

lib/Gitlab/Api/Groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function transfer($group_id, $project_id)
9595
}
9696

9797
/**
98-
* @param integer $id
98+
* @param int $id
9999
* @param array $parameters
100100
* @return mixed
101101
*/

lib/Gitlab/Api/Issues.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,10 +308,10 @@ public function awardEmoji($project_id, $issue_iid)
308308
}
309309

310310
/**
311-
* @param int|string $project_id
312-
* @param int $issue_iid
313-
* @return mixed
314-
*/
311+
* @param int|string $project_id
312+
* @param int $issue_iid
313+
* @return mixed
314+
*/
315315
public function closedByMergeRequests($project_id, $issue_iid)
316316
{
317317
return $this->get($this->getProjectPath($project_id, 'issues/'.$this->encodePath($issue_iid)).'/closed_by');
@@ -326,7 +326,7 @@ public function showParticipants($project_id, $issue_iid)
326326
{
327327
return $this->get($this->getProjectPath($project_id, 'issues/' .$this->encodePath($issue_iid)).'/participants');
328328
}
329-
329+
330330
/**
331331
* {@inheritDoc}
332332
*/

lib/Gitlab/Api/ProjectNamespaces.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public function all(array $parameters = [])
2121
}
2222

2323
/**
24-
* @param integer|string $namespace_id
24+
* @param int|string $namespace_id
2525
* @return mixed
2626
*/
2727
public function show($namespace_id)

lib/Gitlab/Api/Projects.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ public function cancelPipeline($project_id, $pipeline_id)
277277
{
278278
return $this->post($this->getProjectPath($project_id, 'pipelines/'.$this->encodePath($pipeline_id)).'/cancel');
279279
}
280-
280+
281281
/**
282282
* @param int|string $project_id
283283
* @param int $pipeline_id
@@ -287,9 +287,9 @@ public function deletePipeline($project_id, $pipeline_id)
287287
{
288288
return $this->delete($this->getProjectPath($project_id, 'pipelines/'.$this->encodePath($pipeline_id)));
289289
}
290-
290+
291291
/**
292-
* @param integer $project_id
292+
* @param int $project_id
293293
* @param array $parameters
294294
* @return mixed
295295
*/
@@ -835,7 +835,7 @@ public function deployment($project_id, $deployment_id)
835835
{
836836
return $this->get($this->getProjectPath($project_id, 'deployments/'.$this->encodePath($deployment_id)));
837837
}
838-
838+
839839
/**
840840
* @param mixed $project_id
841841
* @param array $parameters
@@ -863,7 +863,7 @@ public function addShare($project_id, array $parameters = [])
863863

864864
return $this->post($this->getProjectPath($project_id, 'share'), $resolver->resolve($parameters));
865865
}
866-
866+
867867
/**
868868
* @param mixed $project_id
869869
* @param int $group_id
@@ -918,7 +918,7 @@ public function removeBadge($project_id, $badge_id)
918918
* @param int $badge_id
919919
* @param array $parameters
920920
* @return mixed
921-
*/
921+
*/
922922
public function updateBadge($project_id, $badge_id, array $parameters = array())
923923
{
924924
return $this->put($this->getProjectPath($project_id, 'badges/' . $this->encodePath($badge_id)), $parameters);

lib/Gitlab/Model/AbstractModel.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ public function __get($property)
109109
if (!in_array($property, static::$properties)) {
110110
throw new RuntimeException(sprintf(
111111
'Property "%s" does not exist for %s object',
112-
$property, get_called_class()
112+
$property,
113+
get_called_class()
113114
));
114115
}
115116

lib/Gitlab/Model/Note.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Class Note
99
*
10-
* @property-read integer $id
10+
* @property-read int $id
1111
* @property-read User $author
1212
* @property-read string $body
1313
* @property-read string $created_at

lib/Gitlab/Model/Project.php

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -781,8 +781,15 @@ public function mergeRequest($id)
781781
*/
782782
public function createMergeRequest($source, $target, $title, $assignee = null, $description = null)
783783
{
784-
$data = $this->client->mergeRequests()->create($this->id, $source, $target, $title, $assignee, $this->id,
785-
$description);
784+
$data = $this->client->mergeRequests()->create(
785+
$this->id,
786+
$source,
787+
$target,
788+
$title,
789+
$assignee,
790+
$this->id,
791+
$description
792+
);
786793

787794
return MergeRequest::fromArray($this->getClient(), $this, $data);
788795
}

test/Gitlab/Tests/Api/AbstractApiTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function shouldPrepareBodyWithCleanArrays()
3333
]
3434
);
3535

36-
$this->assertEquals($expectedBody, urldecode((string)$stream));
36+
$this->assertEquals($expectedBody, urldecode((string) $stream));
3737
}
3838

3939
protected function getAbstractApiMock(array $methods = [])

test/Gitlab/Tests/Api/GroupBoardsTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function shouldShowIssueBoard()
4040

4141
$this->assertEquals($expectedArray, $api->show(1, 2));
4242
}
43-
43+
4444
/**
4545
* @test
4646
*/
@@ -123,7 +123,7 @@ public function shouldGetAllLists()
123123
->with('groups/1/boards/2/lists')
124124
->will($this->returnValue($expectedArray))
125125
;
126-
126+
127127
$this->assertEquals($expectedArray, $api->allLists(1, 2));
128128
}
129129

@@ -143,14 +143,14 @@ public function shouldGetList()
143143
'position' => 3
144144
)
145145
);
146-
146+
147147
$api = $this->getApiMock();
148148
$api->expects($this->once())
149149
->method('get')
150150
->with('groups/1/boards/2/lists/3')
151151
->will($this->returnValue($expectedArray))
152152
;
153-
153+
154154
$this->assertEquals($expectedArray, $api->showList(1, 2, 3));
155155
}
156156

@@ -170,7 +170,7 @@ public function shouldCreateList()
170170
'position' => 3
171171
)
172172
);
173-
173+
174174
$api = $this->getApiMock();
175175
$api->expects($this->once())
176176
->method('post')
@@ -197,14 +197,14 @@ public function shouldUpdateList()
197197
'position' => 1
198198
)
199199
);
200-
200+
201201
$api = $this->getApiMock();
202202
$api->expects($this->once())
203203
->method('put')
204204
->with('groups/5/boards/2/lists/3', array('position' => 1))
205205
->will($this->returnValue($expectedArray))
206206
;
207-
207+
208208
$this->assertEquals($expectedArray, $api->updateList(5, 2, 3, 1));
209209
}
210210

@@ -214,14 +214,14 @@ public function shouldUpdateList()
214214
public function shouldDeleteList()
215215
{
216216
$expectedBool = true;
217-
217+
218218
$api = $this->getApiMock();
219219
$api->expects($this->once())
220220
->method('delete')
221221
->with('groups/1/boards/2/lists/3')
222222
->will($this->returnValue($expectedBool))
223223
;
224-
224+
225225
$this->assertEquals($expectedBool, $api->deleteList(1, 2, 3));
226226
}
227227

test/Gitlab/Tests/Api/IssueBoardsTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function shouldShowIssueBoard()
4040

4141
$this->assertEquals($expectedArray, $api->show(1, 2));
4242
}
43-
43+
4444
/**
4545
* @test
4646
*/
@@ -123,7 +123,7 @@ public function shouldGetAllLists()
123123
->with('projects/1/boards/2/lists')
124124
->will($this->returnValue($expectedArray))
125125
;
126-
126+
127127
$this->assertEquals($expectedArray, $api->allLists(1, 2));
128128
}
129129

@@ -143,14 +143,14 @@ public function shouldGetList()
143143
'position' => 3
144144
)
145145
);
146-
146+
147147
$api = $this->getApiMock();
148148
$api->expects($this->once())
149149
->method('get')
150150
->with('projects/1/boards/2/lists/3')
151151
->will($this->returnValue($expectedArray))
152152
;
153-
153+
154154
$this->assertEquals($expectedArray, $api->showList(1, 2, 3));
155155
}
156156

@@ -170,7 +170,7 @@ public function shouldCreateList()
170170
'position' => 3
171171
)
172172
);
173-
173+
174174
$api = $this->getApiMock();
175175
$api->expects($this->once())
176176
->method('post')
@@ -197,14 +197,14 @@ public function shouldUpdateList()
197197
'position' => 1
198198
)
199199
);
200-
200+
201201
$api = $this->getApiMock();
202202
$api->expects($this->once())
203203
->method('put')
204204
->with('projects/5/boards/2/lists/3', array('position' => 1))
205205
->will($this->returnValue($expectedArray))
206206
;
207-
207+
208208
$this->assertEquals($expectedArray, $api->updateList(5, 2, 3, 1));
209209
}
210210

@@ -214,14 +214,14 @@ public function shouldUpdateList()
214214
public function shouldDeleteList()
215215
{
216216
$expectedBool = true;
217-
217+
218218
$api = $this->getApiMock();
219219
$api->expects($this->once())
220220
->method('delete')
221221
->with('projects/1/boards/2/lists/3')
222222
->will($this->returnValue($expectedBool))
223223
;
224-
224+
225225
$this->assertEquals($expectedBool, $api->deleteList(1, 2, 3));
226226
}
227227

0 commit comments

Comments
 (0)