Skip to content

Commit c72fdae

Browse files
committed
removed params validation
1 parent 9734d23 commit c72fdae

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

lib/Github/Api/Deployment/Policies.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
namespace Github\Api\Deployment;
44

55
use 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

Comments
 (0)