Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
bennetgallein committed Oct 18, 2023
1 parent d26297d commit ffd4314
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Helper
* @param string $type The type of the resource record.
* @param array|string $content The content of the resource record.
* @param int $ttl The TTL.
* @param array $comments The Comment.
* @param array $comments The Comment.
*
* @throws Exceptions\InvalidRecordType If the given type is invalid.
*
Expand Down Expand Up @@ -51,7 +51,7 @@ public static function createResourceRecord(
->setName($name)
->setType($type)
->setTtl($ttl);

if (is_string($content)) {
$content = [$content];
}
Expand Down
4 changes: 2 additions & 2 deletions src/Transformers/RRSetTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ private function transformResourceRecord(ResourceRecord $resourceRecord)
'ttl' => $resourceRecord->getTtl(),
'changetype' => $resourceRecord->getChangeType(),
'records' => $recordList,
'comments' => array_map(function($comment) {
'comments' => array_map(function ($comment) {
return (new CommentTransformer($comment))->transform();
} ,$resourceRecord->getComments())
}, $resourceRecord->getComments()),
];
}

Expand Down
2 changes: 1 addition & 1 deletion src/Zone.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Zone extends AbstractZone
* @param string $type The type of the resource record.
* @param mixed[]|string $content The content of the resource record. When passing a multidimensional array,
* multiple records are created for this resource record.
* @param mixed[]|array $comments The comment to assign to the record.
* @param array|mixed[] $comments The comment to assign to the record.
* @param int $ttl The TTL.
*
* @throws Exceptions\InvalidRecordType If the given type is invalid.
Expand Down
2 changes: 1 addition & 1 deletion tests/Resources/CommentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testTransformer(): void
$this->assertEquals((object) [
'modified_at' => 1234,
'account' => 'test account',
'content' => 'test content'
'content' => 'test content',
], $transformer->transform());
}
}
4 changes: 2 additions & 2 deletions tests/functional/ZoneRecordsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ZoneRecordsTest extends FunctionalTestCase
'name' => '@',
'type' => RecordType::SOA,
'content' => 'ns1.test. hostmaster.test. 0 10800 3605 604800 3600',
'ttl' => 60,
'ttl' => 60,
'comments' => [],
],
['name' => '@', 'type' => RecordType::NS, 'content' => 'ns1.powerdns-php.', 'ttl' => 60, 'comments' => []],
Expand Down Expand Up @@ -90,7 +90,7 @@ function (ResourceRecord $item) use (&$createdRecords) {
'type' => $item->getType(),
'content' => $content,
'ttl' => $item->getTtl(),
'comments' => []
'comments' => [],
];
}
}
Expand Down

0 comments on commit ffd4314

Please sign in to comment.