Skip to content

Commit

Permalink
Fix static tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalevanec committed Mar 19, 2019
1 parent 9c7fbfd commit e09429f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
14 changes: 12 additions & 2 deletions app/code/Magento/Sales/Model/Order/Address/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ class Validator

/**
* @param DirectoryHelper $directoryHelper
* @param CountryFactory $countryFactory
* @param EavConfig $eavConfig
* @param CountryFactory $countryFactory
* @param EavConfig $eavConfig
*/
public function __construct(
DirectoryHelper $directoryHelper,
Expand All @@ -64,6 +64,7 @@ public function __construct(
}

/**
* Validate address.
*
* @param \Magento\Sales\Model\Order\Address $address
* @return array
Expand Down Expand Up @@ -196,23 +197,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 telephone is required for address.
*
* @return bool
* @throws \Magento\Framework\Exception\LocalizedException
*/
protected function isFaxRequired()
{
Expand Down
6 changes: 5 additions & 1 deletion 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 Expand Up @@ -38,7 +41,8 @@ public function __construct(
}

/**
* Returns the first found number from a string
* Returns the first found number from a string.
*
* Parsing depends on given locale (grouping and decimal)
*
* Examples for input:
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 @@ -81,15 +84,15 @@ public function __construct(
}

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

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

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

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

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

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

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

0 comments on commit e09429f

Please sign in to comment.