Skip to content

Commit e447989

Browse files
StyleCIBotLKaemmerling
authored andcommitted
Apply fixes from StyleCI
1 parent 88dd153 commit e447989

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

src/HetznerAPIClient.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
use LKDev\HetznerCloud\Models\Servers\Types\ServerTypes;
2222
use LKDev\HetznerCloud\Models\SSHKeys\SSHKeys;
2323
use LKDev\HetznerCloud\Models\Volumes\Volumes;
24-
use LKDev\HetznerCloud\Models\Zones\RRSet;
2524
use LKDev\HetznerCloud\Models\Zones\Zones;
2625
use Psr\Http\Message\ResponseInterface;
2726

src/Models/Zones/RRSet.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ class RRSet extends Model implements Resource
2020
public int $zone;
2121

2222
/**
23-
* @param string $id
24-
* @param GuzzleClient|null $client
23+
* @param string $id
24+
* @param GuzzleClient|null $client
2525
*/
2626
public function __construct(string $id, ?GuzzleClient $client = null)
2727
{
@@ -43,6 +43,7 @@ public function setAdditionalData($data)
4343
$this->labels = get_object_vars($data->labels);
4444
$this->protection = RRSetProtection::parse($data->protection);
4545
$this->zone = $data->zone;
46+
4647
return $this;
4748
}
4849

@@ -59,7 +60,7 @@ public function __toRequest(): array
5960
'ttl' => $this->ttl,
6061
'records' => $this->records,
6162
];
62-
if (!empty($this->labels)) {
63+
if (! empty($this->labels)) {
6364
$r['labels'] = $this->labels;
6465
}
6566

@@ -93,7 +94,7 @@ public function changeTTL(int $ttl)
9394

9495
public function setRecords(array $records)
9596
{
96-
// TODO: Implement setRecords() method.
97+
// TODO: Implement setRecords() method.
9798
}
9899

99100
public function addRecords(array $records)

src/Models/Zones/Zone.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -375,15 +375,16 @@ public function createRRSet(string $name, string $type, array $records, ?int $tt
375375
}
376376

377377
/**
378-
* @param string $id
378+
* @param string $id
379379
* @return RRSet|null
380+
*
380381
* @throws APIException
381382
*/
382383
public function getRRSetById(string $id): ?RRSet
383384
{
384-
$response = $this->httpClient->get('zones/' . $this->id . "/rrsets/" . $id);;
385-
if (!HetznerAPIClient::hasError($response)) {
386-
return RRSet::parse(json_decode((string)$response->getBody())->rrset);
385+
$response = $this->httpClient->get('zones/'.$this->id.'/rrsets/'.$id);
386+
if (! HetznerAPIClient::hasError($response)) {
387+
return RRSet::parse(json_decode((string) $response->getBody())->rrset);
387388
}
388389

389390
return null;

tests/Unit/Models/Zones/ZoneTest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,14 +141,13 @@ public function testCreateRRSet()
141141
public function testGetById()
142142
{
143143
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone_rrset.json')));
144-
$rrset = $this->zone->getRRSetById("www/A");
145-
$this->assertEquals($rrset->id, "www/A");
144+
$rrset = $this->zone->getRRSetById('www/A');
145+
$this->assertEquals($rrset->id, 'www/A');
146146
$this->assertEquals($rrset->name, 'www');
147147

148148
$this->assertLastRequestEquals('GET', '/zones/4711/rrsets/www/A');
149149
}
150150

151-
152151
protected function getGenericActionResponse(string $command)
153152
{
154153
return str_replace('$command', $command, file_get_contents(__DIR__.'/fixtures/zone_action_generic.json'));

0 commit comments

Comments
 (0)