33namespace Github \Api \Deployment ;
44
55use Github \Api \AbstractApi ;
6- use Github \Exception \MissingArgumentException ;
76
87/**
98 * Listing, creating and updating deployments.
@@ -55,16 +54,10 @@ public function show(string $username, string $repository, string $environment,
5554 * @param string $repository the name of the repository
5655 * @param string $environment the name of the environment.
5756 *
58- * @throws MissingArgumentException
59- *
6057 * @return array information about the deployment branch policy
6158 */
6259 public function create (string $ username , string $ repository , string $ environment , array $ params )
6360 {
64- if (!isset ($ params ['name ' ])) {
65- throw new MissingArgumentException (['name ' ]);
66- }
67-
6861 return $ this ->post ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/environments/ ' .rawurlencode ($ environment ).'/deployment-branch-policies ' , $ params );
6962 }
7063
@@ -82,10 +75,6 @@ public function create(string $username, string $repository, string $environment
8275 */
8376 public function update (string $ username , string $ repository , string $ environment , int $ id , array $ params )
8477 {
85- if (!isset ($ params ['name ' ])) {
86- throw new MissingArgumentException (['name ' ]);
87- }
88-
8978 return $ this ->put ('/repos/ ' .rawurlencode ($ username ).'/ ' .rawurlencode ($ repository ).'/environments/ ' .rawurlencode ($ environment ).'/deployment-branch-policies/ ' .$ id , $ params );
9079 }
9180
0 commit comments