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
44{
55 /**
66 * @param int $project_id
7+ * @param array $parameters
78 * @return mixed
89 */
9- public function all ($ project_id )
10+ public function all ($ project_id, array $ parameters = [] )
1011 {
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 ));
1214 }
1315
1416 /**
Original file line number Diff line number Diff line change @@ -6,25 +6,30 @@ class Environments extends AbstractApi
66{
77 /**
88 * @param int $project_id
9+ * @param array $parameters
910 * @return mixed
1011 */
11- public function all ($ project_id )
12+ public function all ($ project_id, array $ parameters = [] )
1213 {
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 ));
1416 }
1517
1618 /**
1719 * @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+ * )
1925 * @return mixed
2026 */
2127 public function create ($ project_id , array $ parameters = array ())
2228 {
2329 $ resolver = new OptionsResolver ();
2430 $ resolver ->setDefined ('name ' )
31+ ->setRequired ('name ' )
2532 ->setAllowedTypes ('name ' , 'string ' );
26- $ resolver ->setDefined ('slug ' )
27- ->setAllowedTypes ('slug ' , 'string ' );
2833 $ resolver ->setDefined ('external_url ' )
2934 ->setAllowedTypes ('external_url ' , 'string ' );
3035
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ class Repositories extends AbstractApi
66{
77 /**
88 * @param int $project_id
9+ * @param array $parameters
910 * @return mixed
1011 */
1112 public function branches ($ project_id , array $ parameters = [])
You can’t perform that action at this time.
0 commit comments