From 98945d20deffc41268304ce9efbfd3e27bb1e5e1 Mon Sep 17 00:00:00 2001 From: Vaidas Lungis Date: Wed, 22 Feb 2017 18:23:47 +0200 Subject: [PATCH] Remove ending dot char from target value of dig response (#7) Like it is done host value --- src/Hostinger/RecordType/Cname.php | 2 +- src/Hostinger/RecordType/Mx.php | 2 +- src/Hostinger/RecordType/Ns.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Hostinger/RecordType/Cname.php b/src/Hostinger/RecordType/Cname.php index ef9f5c2..620addf 100644 --- a/src/Hostinger/RecordType/Cname.php +++ b/src/Hostinger/RecordType/Cname.php @@ -25,7 +25,7 @@ public function transform(array $lines) 'ttl' => $recordProp[1], 'class' => $recordProp[2], 'type' => $recordProp[3], - 'target' => $recordProp[4], + 'target' => trim($recordProp[4], '\.'), ]; } return $output; diff --git a/src/Hostinger/RecordType/Mx.php b/src/Hostinger/RecordType/Mx.php index fd580fc..8ac98ba 100644 --- a/src/Hostinger/RecordType/Mx.php +++ b/src/Hostinger/RecordType/Mx.php @@ -27,7 +27,7 @@ public function transform(array $lines) 'class' => $recordProp[2], 'type' => $recordProp[3], 'pri' => $recordProp[4], - 'target' => $recordProp[5], + 'target' => trim($recordProp[5], '\.'), ]; } return $output; diff --git a/src/Hostinger/RecordType/Ns.php b/src/Hostinger/RecordType/Ns.php index 98cca61..270d6f3 100644 --- a/src/Hostinger/RecordType/Ns.php +++ b/src/Hostinger/RecordType/Ns.php @@ -25,7 +25,7 @@ public function transform(array $lines) 'ttl' => $recordProp[1], 'class' => $recordProp[2], 'type' => $recordProp[3], - 'target' => $recordProp[4], + 'target' => trim($recordProp[4], '\.'), ]; } return $output;