Enforced domain to be lowercase for case-sensitivity purposes and corrected some PhpDoc strings
This commit is contained in:
parent
463e86f59f
commit
2e184ebc74
1 changed files with 5 additions and 1 deletions
|
@ -24,6 +24,8 @@
|
||||||
*/
|
*/
|
||||||
public static function resolveDomain(string $domain, bool $useDatabase=true): DnsRecord
|
public static function resolveDomain(string $domain, bool $useDatabase=true): DnsRecord
|
||||||
{
|
{
|
||||||
|
$domain = strtolower($domain);
|
||||||
|
|
||||||
// Return the mocked record if the mocking record is set
|
// Return the mocked record if the mocking record is set
|
||||||
if(isset(self::$mockedRecords[$domain]))
|
if(isset(self::$mockedRecords[$domain]))
|
||||||
{
|
{
|
||||||
|
@ -124,11 +126,13 @@
|
||||||
* Adds a mock DNS record for a specific domain.
|
* Adds a mock DNS record for a specific domain.
|
||||||
*
|
*
|
||||||
* @param string $domain The domain name for which the DNS record is being mocked.
|
* @param string $domain The domain name for which the DNS record is being mocked.
|
||||||
* @param DnsRecord $record The DNS record to be associated with the specified domain.
|
* @param DnsRecord|string $record The DNS record to be associated with the specified domain.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function addMock(string $domain, DnsRecord|string $record): void
|
public static function addMock(string $domain, DnsRecord|string $record): void
|
||||||
{
|
{
|
||||||
|
$domain = strtolower($domain);
|
||||||
|
|
||||||
if(isset(self::$mockedRecords[$domain]))
|
if(isset(self::$mockedRecords[$domain]))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue