From c72fdae237d59aeb058d18850a7e3cb012a65197 Mon Sep 17 00:00:00 2001 From: Froxz Date: Fri, 10 Mar 2023 08:58:11 +0200 Subject: [PATCH] removed params validation --- lib/Github/Api/Deployment/Policies.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lib/Github/Api/Deployment/Policies.php b/lib/Github/Api/Deployment/Policies.php index e4ca3b8c66c..c1d5db78631 100644 --- a/lib/Github/Api/Deployment/Policies.php +++ b/lib/Github/Api/Deployment/Policies.php @@ -3,7 +3,6 @@ namespace Github\Api\Deployment; use Github\Api\AbstractApi; -use Github\Exception\MissingArgumentException; /** * Listing, creating and updating deployments. @@ -55,16 +54,10 @@ public function show(string $username, string $repository, string $environment, * @param string $repository the name of the repository * @param string $environment the name of the environment. * - * @throws MissingArgumentException - * * @return array information about the deployment branch policy */ public function create(string $username, string $repository, string $environment, array $params) { - if (!isset($params['name'])) { - throw new MissingArgumentException(['name']); - } - return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/environments/'.rawurlencode($environment).'/deployment-branch-policies', $params); } @@ -82,10 +75,6 @@ public function create(string $username, string $repository, string $environment */ public function update(string $username, string $repository, string $environment, int $id, array $params) { - if (!isset($params['name'])) { - throw new MissingArgumentException(['name']); - } - return $this->put('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/environments/'.rawurlencode($environment).'/deployment-branch-policies/'.$id, $params); }