for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Omnipay\BillPay\Message\ResponseData;
use SimpleXMLElement;
/**
* Access corrected address in the response, internal usage only
*
* @author Andreas Lange <[email protected]>
* @copyright 2016, Connox GmbH
* @license MIT
*/
trait CorrectedAddressTrait
{
* Gets the corrected address
* @return array|null
public function getCorrectedAddress()
if (!$this->hasCorrectedAddress()) {
return null;
}
return [
'street' => (string)$this->getData()->corrected_address['street'],
'streetNo' => (string)$this->getData()->corrected_address['streetNo'],
'zip' => (string)$this->getData()->corrected_address['zip'],
'city' => (string)$this->getData()->corrected_address['city'],
'country' => (string)$this->getData()->corrected_address['country'],
];
* @return SimpleXMLElement
* @codeCoverageIgnore
abstract public function getData();
* @return bool
public function hasCorrectedAddress()
return isset($this->getData()->corrected_address);