Skip to content

Commit

Permalink
Update DnsQuerifier.php
Browse files Browse the repository at this point in the history
  • Loading branch information
Sapistudio authored Sep 15, 2019
1 parent 59b2dfd commit 2fd3ea6
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/DnsQuerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public function __construct($hostName)

/** DnsQuerifier::hasDmarc() */
public function hasDmarc(){
return (int) Analyzer\DmarcAnalyzer::create($this->getDmarcRecord())->dmarcIsValid();
return (int) $this->getDmarcAnalyzer()->dmarcIsValid();
}

/** DnsQuerifier::hasSpf)*/
Expand All @@ -91,7 +91,7 @@ public function hasSpf(){

/** DnsQuerifier::getSpfRecord() */
public function getSpfRecord(){
return Analyzer\SpfAnalyzer::create($this->getTxtRecords())->getSpf();
return $this->getSpfAnalyzer()->getSpf();
}

/** DnsQuerifier::getDmarcRecord()*/
Expand All @@ -104,6 +104,16 @@ public function getDmarcRecord()
return ($dmarc) ? $dmarc['txt'] : null;
}

/** DnsQuerifier::getDmarcAnalyzer() */
public function getDmarcAnalyzer(){
return Analyzer\DmarcAnalyzer::create($this->getDmarcRecord());
}

/** DnsQuerifier::getSpfAnalyzer() */
public function getSpfAnalyzer(){
return Analyzer\SpfAnalyzer::create($this->getTxtRecords());
}

/** DnsQuerifier::getTxtRecords() */
public function getTxtRecords()
{
Expand Down

0 comments on commit 2fd3ea6

Please sign in to comment.