Skip to content

Commit

Permalink
Cleaning Address Interface and model for Street data.
Browse files Browse the repository at this point in the history
  • Loading branch information
romainruaud committed Jul 7, 2017
1 parent bd651d8 commit f42db79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Api/Data/AddressInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function getCountryId();
/**
* Get street.
*
* @return string[]|null
* @return string[]|string|null
*/
public function getStreet();

Expand Down Expand Up @@ -104,11 +104,11 @@ public function setRegionId($regionId);
/**
* Set street.
*
* @param string[] $street Street.
* @param string[]|string $street Street.
*
* @return $this
*/
public function setStreet(array $street);
public function setStreet($street);

/**
* Set postcode.
Expand Down
4 changes: 2 additions & 2 deletions Model/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getRegionId()
*/
public function getStreet()
{
return $this->getData(self::STREET);
return is_array($this->getData(self::STREET)) ? $this->getData(self::STREET) : [$this->getData(self::STREET)];
}

/**
Expand Down Expand Up @@ -109,7 +109,7 @@ public function setRegionId($regionId)
/**
* {@inheritDoc}
*/
public function setStreet(array $street)
public function setStreet($street)
{
return $this->setData(self::STREET, $street);
}
Expand Down

0 comments on commit f42db79

Please sign in to comment.