Skip to content

Commit f57443d

Browse files
Fixed deprecation warning
1 parent 037cb37 commit f57443d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

lib/Gitlab/Api/MergeRequests.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -183,29 +183,29 @@ public function create($project_id, $source, $target, $title, $parameters = null
183183
/**
184184
* @param int|string $project_id
185185
* @param int $mr_iid
186-
* @param array $params
186+
* @param array $parameters
187187
*
188188
* @return mixed
189189
*/
190-
public function update($project_id, $mr_iid, array $params)
190+
public function update($project_id, $mr_iid, array $parameters)
191191
{
192-
return $this->put($this->getProjectPath($project_id, 'merge_requests/'.$this->encodePath($mr_iid)), $params);
192+
return $this->put($this->getProjectPath($project_id, 'merge_requests/'.$this->encodePath($mr_iid)), $parameters);
193193
}
194194

195195
/**
196196
* @param int|string $project_id
197197
* @param int $mr_iid
198-
* @param string|array|null $message
198+
* @param string|array|null $parameters
199199
*
200200
* @return mixed
201201
*/
202-
public function merge($project_id, $mr_iid, $message = null)
202+
public function merge($project_id, $mr_iid, $parameters = null)
203203
{
204-
if (is_array($message)) {
205-
@trigger_error(sprintf('Passing an array to the $message parameter of %s() is deprecated since 9.18 and will be banned in 10.0.', __METHOD__), E_USER_DEPRECATED);
206-
$params = $message;
204+
if (is_array($parameters)) {
205+
$params = $parameters;
207206
} else {
208-
$params = ['merge_commit_message' => $message];
207+
@trigger_error(sprintf('Passing a string to the $parameters parameter of %s() is deprecated since 9.18 and will be banned in 10.0.', __METHOD__), E_USER_DEPRECATED);
208+
$params = ['merge_commit_message' => $parameters];
209209
}
210210

211211
return $this->put($this->getProjectPath($project_id, 'merge_requests/'.$this->encodePath($mr_iid).'/merge'), $params);

0 commit comments

Comments
 (0)