File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -4,11 +4,13 @@ class Deployments extends AbstractApi
4
4
{
5
5
/**
6
6
* @param int $project_id
7
+ * @param array $parameters
7
8
* @return mixed
8
9
*/
9
- public function all ($ project_id )
10
+ public function all ($ project_id, array $ parameters = [] )
10
11
{
11
- return $ this ->get ($ this ->getProjectPath ($ project_id , 'deployments ' ));
12
+ $ resolver = $ this ->createOptionsResolver ();
13
+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'deployments ' ), $ resolver ->resolve ($ parameters ));
12
14
}
13
15
14
16
/**
Original file line number Diff line number Diff line change @@ -6,25 +6,30 @@ class Environments extends AbstractApi
6
6
{
7
7
/**
8
8
* @param int $project_id
9
+ * @param array $parameters
9
10
* @return mixed
10
11
*/
11
- public function all ($ project_id )
12
+ public function all ($ project_id, array $ parameters = [] )
12
13
{
13
- return $ this ->get ($ this ->getProjectPath ($ project_id , 'environments ' ));
14
+ $ resolver = $ this ->createOptionsResolver ();
15
+ return $ this ->get ($ this ->getProjectPath ($ project_id , 'environments ' ), $ resolver ->resolve ($ parameters ));
14
16
}
15
17
16
18
/**
17
19
* @param int $project_id
18
- * @param array $parameters
20
+ * @param array $parameters (
21
+ *
22
+ * @var string $name The name of the environment
23
+ * @var string $external_url Place to link to for this environment
24
+ * )
19
25
* @return mixed
20
26
*/
21
27
public function create ($ project_id , array $ parameters = array ())
22
28
{
23
29
$ resolver = new OptionsResolver ();
24
30
$ resolver ->setDefined ('name ' )
31
+ ->setRequired ('name ' )
25
32
->setAllowedTypes ('name ' , 'string ' );
26
- $ resolver ->setDefined ('slug ' )
27
- ->setAllowedTypes ('slug ' , 'string ' );
28
33
$ resolver ->setDefined ('external_url ' )
29
34
->setAllowedTypes ('external_url ' , 'string ' );
30
35
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ class Repositories extends AbstractApi
6
6
{
7
7
/**
8
8
* @param int $project_id
9
+ * @param array $parameters
9
10
* @return mixed
10
11
*/
11
12
public function branches ($ project_id , array $ parameters = [])
You can’t perform that action at this time.
0 commit comments