Skip to content

Commit

Permalink
Backport additional changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartlomiejsz committed Mar 25, 2019
1 parent 43cc9a4 commit f77f54d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
13 changes: 11 additions & 2 deletions app/code/Magento/Sales/Model/Order/Address/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ class Validator

/**
* @param DirectoryHelper $directoryHelper
* @param CountryFactory $countryFactory
* @param EavConfig $eavConfig
* @param CountryFactory $countryFactory
* @param EavConfig $eavConfig
*/
public function __construct(
DirectoryHelper $directoryHelper,
Expand Down Expand Up @@ -195,23 +195,32 @@ protected function isStateRequired($countryId)
}

/**
* Check whether telephone is required for address.
*
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function isTelephoneRequired()
{
return ($this->eavConfig->getAttribute('customer_address', 'telephone')->getIsRequired());
}

/**
* Check whether company is required for address.
*
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function isCompanyRequired()
{
return ($this->eavConfig->getAttribute('customer_address', 'company')->getIsRequired());
}

/**
* Check whether fax is required for address.
*
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function isFaxRequired()
{
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/Magento/Framework/Locale/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
*/
namespace Magento\Framework\Locale;

/**
* Price locale format.
*/
class Format implements \Magento\Framework\Locale\FormatInterface
{
/**
Expand Down
17 changes: 10 additions & 7 deletions lib/internal/Magento/Framework/Locale/Resolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
use Magento\Framework\App\DeploymentConfig;
use Magento\Framework\App\ObjectManager;

/**
* Manages locale config information.
*/
class Resolver implements ResolverInterface
{
/**
Expand Down Expand Up @@ -76,15 +79,15 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getDefaultLocalePath()
{
return $this->defaultLocalePath;
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function setDefaultLocale($locale)
{
Expand All @@ -93,7 +96,7 @@ public function setDefaultLocale($locale)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getDefaultLocale()
{
Expand All @@ -111,7 +114,7 @@ public function getDefaultLocale()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function setLocale($locale = null)
{
Expand All @@ -124,7 +127,7 @@ public function setLocale($locale = null)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function getLocale()
{
Expand All @@ -135,7 +138,7 @@ public function getLocale()
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function emulate($scopeId)
{
Expand All @@ -155,7 +158,7 @@ public function emulate($scopeId)
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function revert()
{
Expand Down

0 comments on commit f77f54d

Please sign in to comment.