@@ -38,11 +38,9 @@ class Zone extends Model implements Resource
3838 public string $ mode ;
3939 /**
4040 * @var array<PrimaryNameserver>
41- *
4241 */
4342 public array $ primary_nameservers ;
4443
45-
4644 /**
4745 * @var array|\LKDev\HetznerCloud\Models\Protection
4846 */
@@ -65,7 +63,6 @@ class Zone extends Model implements Resource
6563
6664 /**
6765 * @var string
68- *
6966 */
7067 public string $ registrar ;
7168
@@ -75,8 +72,8 @@ class Zone extends Model implements Resource
7572 public AuthoritativeNameservers $ authoritative_nameservers ;
7673
7774 /**
78- * @param int $zoneId
79- * @param GuzzleClient|null $httpClient
75+ * @param int $zoneId
76+ * @param GuzzleClient|null $httpClient
8077 */
8178 public function __construct (int $ zoneId , ?GuzzleClient $ httpClient = null )
8279 {
@@ -134,9 +131,9 @@ public function reload()
134131 public function delete (): ?APIResponse
135132 {
136133 $ response = $ this ->httpClient ->delete ($ this ->replaceZoneIdInUri ('zones/{id} ' ));
137- if (!HetznerAPIClient::hasError ($ response )) {
134+ if (! HetznerAPIClient::hasError ($ response )) {
138135 return APIResponse::create ([
139- 'action ' => Action::parse (json_decode ((string )$ response ->getBody ())->action ),
136+ 'action ' => Action::parse (json_decode ((string ) $ response ->getBody ())->action ),
140137 ], $ response ->getHeaders ());
141138 }
142139
@@ -148,7 +145,7 @@ public function delete(): ?APIResponse
148145 *
149146 * @see https://docs.hetzner.cloud/reference/cloud#zones-update-a-zone
150147 *
151- * @param array $data
148+ * @param array $data
152149 * @return APIResponse|null
153150 *
154151 * @throws \LKDev\HetznerCloud\APIException
@@ -158,9 +155,9 @@ public function update(array $data)
158155 $ response = $ this ->httpClient ->put ($ this ->replaceZoneIdInUri ('zones/{id} ' ), [
159156 'json ' => $ data ,
160157 ]);
161- if (!HetznerAPIClient::hasError ($ response )) {
158+ if (! HetznerAPIClient::hasError ($ response )) {
162159 return APIResponse::create ([
163- 'zone ' => self ::parse (json_decode ((string )$ response ->getBody ())->zone ),
160+ 'zone ' => self ::parse (json_decode ((string ) $ response ->getBody ())->zone ),
164161 ], $ response ->getHeaders ());
165162 }
166163
@@ -172,29 +169,29 @@ public function update(array $data)
172169 *
173170 * @see https://docs.hetzner.cloud/#zone-actions-change-zone-protection
174171 *
175- * @param bool $delete
172+ * @param bool $delete
176173 * @return APIResponse|null
177174 *
178175 * @throws \LKDev\HetznerCloud\APIException
179176 */
180177 public function changeProtection (bool $ delete = true ): ?APIResponse
181178 {
182- $ response = $ this ->httpClient ->post ('zones/ ' . $ this ->id . '/actions/change_protection ' , [
179+ $ response = $ this ->httpClient ->post ('zones/ ' . $ this ->id . '/actions/change_protection ' , [
183180 'json ' => [
184181 'delete ' => $ delete ,
185182 ],
186183 ]);
187- if (!HetznerAPIClient::hasError ($ response )) {
184+ if (! HetznerAPIClient::hasError ($ response )) {
188185 return APIResponse::create ([
189- 'action ' => Action::parse (json_decode ((string )$ response ->getBody ())->action ),
186+ 'action ' => Action::parse (json_decode ((string ) $ response ->getBody ())->action ),
190187 ], $ response ->getHeaders ());
191188 }
192189
193190 return null ;
194191 }
195192
196193 /**
197- * @param string $uri
194+ * @param string $uri
198195 * @return string
199196 */
200197 protected function replaceZoneIdInUri (string $ uri ): string
@@ -215,5 +212,3 @@ public static function parse($input)
215212 return (new self ($ input ->id ))->setAdditionalData ($ input );
216213 }
217214}
218-
219-
0 commit comments