Skip to content

Commit 0af887b

Browse files
committed
use periodyears
1 parent 6e4a181 commit 0af887b

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ $transfer = $reg->transfer($domain, 'authcode', [$contact]);
127127

128128
## Library Registrar API
129129
* **available(string $domain): bool** - Checks to see if a domain is available for registration.
130-
* **purchase(string $domain, array $contacts, int $period = 1, array $nameservers = []): array** - Purchase a domain name.
130+
* **purchase(string $domain, array $contacts, int $periodYears = 1, array $nameservers = []): array** - Purchase a domain name.
131131
* **suggest(array $query, array $tlds = [], int|null $limit = null, int|null $priceMax = null, int|null $priceMin = null): array** - Suggest or search for domain names.
132132
* **getDomain(string $domain): array** - Get domain details.
133-
* **renew(string $domain, int $period): array** - Renew a domain name.
134-
* **transfer(string $domain, string $authCode, array $contacts, int $period = 1, array $nameservers = []): array** - Transfer a domain name.
133+
* **renew(string $domain, int $periodYears): array** - Renew a domain name.
134+
* **transfer(string $domain, string $authCode, array $contacts, int $periodYears = 1, array $nameservers = []): array** - Transfer a domain name.
135135

136136

137137
## System Requirements

src/Domains/Registrar.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ public function available(string $domain): bool
5151
* Purchase a domain
5252
*
5353
* @param string $domain
54-
* @param int $period
54+
* @param int $periodYears
5555
* @param array|Contact $contacts
5656
* @param array $nameservers
5757
* @return PurchaseResult
5858
*/
59-
public function purchase(string $domain, array|Contact $contacts, int $period = 1, array $nameservers = []): PurchaseResult
59+
public function purchase(string $domain, array|Contact $contacts, int $periodYears = 1, array $nameservers = []): PurchaseResult
6060
{
61-
return $this->adapter->purchase($domain, $contacts, $period, $nameservers);
61+
return $this->adapter->purchase($domain, $contacts, $periodYears, $nameservers);
6262
}
6363

6464
/**
@@ -115,26 +115,26 @@ public function updateDomain(string $domain, array $details, array|Contact|null
115115
* Get the price of a domain
116116
*
117117
* @param string $domain
118-
* @param int $period
118+
* @param int $periodYears
119119
* @param string $regType
120120
* @param int $ttl
121121
* @return PriceResult
122122
*/
123-
public function getPrice(string $domain, int $period = 1, string $regType = self::REG_TYPE_NEW, int $ttl = 3600): PriceResult
123+
public function getPrice(string $domain, int $periodYears = 1, string $regType = self::REG_TYPE_NEW, int $ttl = 3600): PriceResult
124124
{
125-
return $this->adapter->getPrice($domain, $period, $regType, $ttl);
125+
return $this->adapter->getPrice($domain, $periodYears, $regType, $ttl);
126126
}
127127

128128
/**
129129
* Renew a domain
130130
*
131131
* @param string $domain
132-
* @param int $period
132+
* @param int $periodYears
133133
* @return RenewResult
134134
*/
135-
public function renew(string $domain, int $period): RenewResult
135+
public function renew(string $domain, int $periodYears): RenewResult
136136
{
137-
return $this->adapter->renew($domain, $period);
137+
return $this->adapter->renew($domain, $periodYears);
138138
}
139139

140140
/**
@@ -146,9 +146,9 @@ public function renew(string $domain, int $period): RenewResult
146146
* @param array $nameservers
147147
* @return TransferResult
148148
*/
149-
public function transfer(string $domain, string $authCode, array|Contact $contacts, int $period = 1, array $nameservers = []): TransferResult
149+
public function transfer(string $domain, string $authCode, array|Contact $contacts, int $periodYears = 1, array $nameservers = []): TransferResult
150150
{
151-
return $this->adapter->transfer($domain, $authCode, $contacts, $period, $nameservers);
151+
return $this->adapter->transfer($domain, $authCode, $contacts, $periodYears, $nameservers);
152152
}
153153

154154
/**

src/Domains/Registrar/Result/PurchaseResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function __construct(
1010
public string $domainId,
1111
public bool $successful,
1212
public ?string $domain = null,
13-
public ?int $period = null,
13+
public ?int $periodYears = null,
1414
public ?array $nameservers = null,
1515
) {
1616
}

src/Domains/Registrar/Result/TransferResult.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public function __construct(
1010
public string $domainId,
1111
public bool $successful,
1212
public ?string $domain = null,
13-
public ?int $period = null,
13+
public ?int $periodYears = null,
1414
public ?array $nameservers = null,
1515
) {
1616
}

0 commit comments

Comments
 (0)