Skip to content

Commit dba5902

Browse files
StyleCIBotLKaemmerling
authored andcommitted
Apply fixes from StyleCI
1 parent 6753f35 commit dba5902

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/Models/Zones/RRSet.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@ class RRSet extends Model implements Resource
2424
/**
2525
* Creates a new RRSet. This is useful if you want to create a new RRSet to pass to the createRRSet method of a Zone.
2626
*
27-
* @param string $name
28-
* @param string $type
29-
* @param array $records
30-
* @param int|null $ttl
31-
* @param array|null $labels
27+
* @param string $name
28+
* @param string $type
29+
* @param array $records
30+
* @param int|null $ttl
31+
* @param array|null $labels
3232
* @return RRSet|null
3333
*/
3434
public static function create(string $name, string $type, array $records, ?int $ttl = null, ?array $labels = []): ?RRSet
3535
{
36-
return (new RRset(""))->setAdditionalData((object)[
36+
return (new RRset(''))->setAdditionalData((object) [
3737
'name' => $name,
3838
'type' => $type,
3939
'ttl' => $ttl,
4040
'records' => $records,
41-
'labels' => (object)$labels,
42-
'protection' => (object)[],
41+
'labels' => (object) $labels,
42+
'protection' => (object) [],
4343
'zone' => 0,
4444
]);
4545
}

tests/Unit/Models/Zones/ZonesTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function setUp(): void
2525

2626
public function testCreatePrimarySimple()
2727
{
28-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zone_create.json')));
28+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone_create.json')));
2929
$resp = $this->zones->create('example.com', ZoneMode::PRIMARY);
3030

3131
$Zone = $resp->getResponsePart('zone');
@@ -40,11 +40,11 @@ public function testCreatePrimarySimple()
4040

4141
public function testCreatePrimaryFull()
4242
{
43-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zone_create.json')));
43+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone_create.json')));
4444
$resp = $this->zones->create('example.com', ZoneMode::PRIMARY, 10, ['key' => 'value'], [], [
45-
(RRSet::create('@', 'A', [
45+
RRSet::create('@', 'A', [
4646
new Record('192.0.2.1', 'my comment'),
47-
], 3600, [])),
47+
], 3600, []),
4848
]);
4949

5050
$Zone = $resp->getResponsePart('zone');
@@ -63,10 +63,10 @@ public function testCreatePrimaryFull()
6363

6464
public function testCreateSecondary()
6565
{
66-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zone_create.json')));
66+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone_create.json')));
6767
$resp = $this->zones->create('example.com', ZoneMode::SECONDARY, 10, ['key' => 'value'], [
6868
new PrimaryNameserver('192.168.178.1', 53),
69-
],);
69+
], );
7070

7171
$Zone = $resp->getResponsePart('zone');
7272
$this->assertEquals($Zone->id, 4711);
@@ -85,7 +85,7 @@ public function testCreateSecondary()
8585

8686
public function testGetByName()
8787
{
88-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zone.json')));
88+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone.json')));
8989
$Zone = $this->zones->getByName('example.com');
9090
$this->assertEquals(4711, $Zone->id);
9191
$this->assertEquals('example.com', $Zone->name);
@@ -95,7 +95,7 @@ public function testGetByName()
9595

9696
public function testGet()
9797
{
98-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zone.json')));
98+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zone.json')));
9999
$Zone = $this->zones->get(4711);
100100
$this->assertEquals($Zone->id, 4711);
101101
$this->assertEquals($Zone->name, 'example.com');
@@ -105,7 +105,7 @@ public function testGet()
105105

106106
public function testAll()
107107
{
108-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zones.json')));
108+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zones.json')));
109109
$zones = $this->zones->all();
110110
$this->assertCount(1, $zones);
111111
$Zone = $zones[0];
@@ -117,7 +117,7 @@ public function testAll()
117117

118118
public function testList()
119119
{
120-
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__ . '/fixtures/zones.json')));
120+
$this->mockHandler->append(new Response(200, [], file_get_contents(__DIR__.'/fixtures/zones.json')));
121121
$zones = $this->zones->list()->zones;
122122
$this->assertCount(1, $zones);
123123
$Zone = $zones[0];

0 commit comments

Comments
 (0)