Skip to content

Commit 76f77f6

Browse files
committed
Use OptionsResolver in Projects::hooks
1 parent 78c9c49 commit 76f77f6

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/Gitlab/Api/Projects.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,15 @@ public function removeMember($project_id, $user_id)
299299

300300
/**
301301
* @param int $project_id
302-
* @param int $page
303-
* @param int $per_page
302+
* @param array $parameters
303+
*
304304
* @return mixed
305305
*/
306-
public function hooks($project_id, $page = 1, $per_page = self::PER_PAGE)
306+
public function hooks($project_id, array $parameters = [])
307307
{
308-
return $this->get($this->getProjectPath($project_id, 'hooks'), array(
309-
'page' => $page,
310-
'per_page' => $per_page
311-
));
308+
$resolver = $this->createOptionsResolver();
309+
310+
return $this->get($this->getProjectPath($project_id, 'hooks'), $resolver->resolve($parameters));
312311
}
313312

314313
/**

0 commit comments

Comments
 (0)