Skip to content

Commit

Permalink
Update Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hryvinskyi committed Sep 20, 2018
1 parent 1e4dd7d commit 46fdf6d
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 146 deletions.
18 changes: 10 additions & 8 deletions app/code/Magento/Catalog/Ui/Component/ColumnFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@ public function __construct(\Magento\Framework\View\Element\UiComponentFactory $
$this->componentFactory = $componentFactory;
}

/**
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
* @param \Magento\Framework\View\Element\UiComponent\ContextInterface $context
* @param array $config
*
* @return \Magento\Ui\Component\Listing\Columns\ColumnInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Create Factory
*
* @param \Magento\Catalog\Api\Data\ProductAttributeInterface $attribute
* @param \Magento\Framework\View\Element\UiComponent\ContextInterface $context
* @param array $config
*
* @return \Magento\Ui\Component\Listing\Columns\ColumnInterface
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function create($attribute, $context, array $config = [])
{
$columnName = $attribute->getAttributeCode();
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/CatalogUrlRewrite/Model/ObjectRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct($entities)
}

/**
* Get
* Get Entity
*
* @param int $entityId
* @return \Magento\Framework\DataObject|null
Expand All @@ -37,7 +37,7 @@ public function get($entityId)
}

/**
* List
* List Entities
*
* @return \Magento\Framework\DataObject[]
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,15 @@ public function getTotals()
return $this->_collection->getTotals();
}

/**
* Format price by specified website
*
* @param float $price
* @param null|int $websiteId
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Format price by specified website
*
* @param float $price
* @param null|int $websiteId
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function formatCurrency($price, $websiteId = null)
{
return $this->_storeManager->getWebsite($websiteId)->getBaseCurrency()->format($price);
Expand Down
12 changes: 6 additions & 6 deletions app/code/Magento/Fedex/Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -982,12 +982,12 @@ public function getCode($type, $code = '')
}
}

/**
* Return FeDex currency ISO code by Magento Base Currency Code
*
* @return string 3-digit currency code
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Return FeDex currency ISO code by Magento Base Currency Code
*
* @return string 3-digit currency code
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getCurrencyCode()
{
$codes = [
Expand Down
206 changes: 103 additions & 103 deletions app/code/Magento/Store/Model/Store.php
Original file line number Diff line number Diff line change
Expand Up @@ -460,12 +460,12 @@ protected function _getSession()
return $this->_session;
}

/**
* Validation rules for store
*
* @return \Zend_Validate_Interface|null
* @throws \Zend_Validate_Exception
*/
/**
* Validation rules for store
*
* @return \Zend_Validate_Interface|null
* @throws \Zend_Validate_Exception
*/
protected function _getValidationRulesBeforeSave()
{
$validator = new \Magento\Framework\Validator\DataObject();
Expand All @@ -487,15 +487,15 @@ protected function _getValidationRulesBeforeSave()
return $validator;
}

/**
* Loading store data
*
* @param mixed $key
* @param string $field
*
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Loading store data
*
* @param mixed $key
* @param string $field
*
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function load($key, $field = null)
{
if (!is_numeric($key) && $field === null) {
Expand Down Expand Up @@ -565,12 +565,12 @@ public function setWebsite(Website $website)
$this->setWebsiteId($website->getId());
}

/**
* Retrieve store website
*
* @return Website|bool
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve store website
*
* @return Website|bool
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getWebsite()
{
if ($this->getWebsiteId() === null) {
Expand All @@ -579,15 +579,15 @@ public function getWebsite()
return $this->websiteRepository->getById($this->getWebsiteId());
}

/**
* Retrieve url using store configuration specific
*
* @param string $route
* @param array $params
*
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve url using store configuration specific
*
* @param string $route
* @param array $params
*
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getUrl($route = '', $params = [])
{
/** @var $url UrlInterface */
Expand Down Expand Up @@ -883,14 +883,14 @@ public function getDefaultCurrency()
return $currency;
}

/**
* Set current store currency code
*
* @param string $code
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Set current store currency code
*
* @param string $code
*
* @return string
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function setCurrentCurrencyCode($code)
{
$code = strtoupper($code);
Expand Down Expand Up @@ -976,12 +976,12 @@ public function getAllowedCurrencies()
return explode(',', $this->getConfig($this->_currencyInstalled));
}

/**
* Retrieve store current currency
*
* @return Currency
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Retrieve store current currency
*
* @return Currency
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getCurrentCurrency()
{
$currency = $this->getData('current_currency');
Expand All @@ -999,23 +999,23 @@ public function getCurrentCurrency()
return $currency;
}

/**
* Retrieve current currency rate
*
* @return float
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Retrieve current currency rate
*
* @return float
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function getCurrentCurrencyRate()
{
return $this->getBaseCurrency()->getRate($this->getCurrentCurrency());
}

/**
* Retrieve root category identifier
*
* @return int
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve root category identifier
*
* @return int
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getRootCategoryId()
{
if (!$this->getGroup()) {
Expand All @@ -1036,12 +1036,12 @@ public function setGroup(Group $group)
return $this;
}

/**
* Retrieve group model
*
* @return Group|bool
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve group model
*
* @return Group|bool
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getGroup()
{
if (null === $this->getGroupId()) {
Expand Down Expand Up @@ -1144,12 +1144,12 @@ public function getDefaultGroupId()
return $this->_getData('default_group_id');
}

/**
* Check if store can be deleted
*
* @return boolean
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Check if store can be deleted
*
* @return boolean
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function isCanDelete()
{
if (!$this->getId()) {
Expand All @@ -1159,13 +1159,13 @@ public function isCanDelete()
return $this->getGroup()->getStoresCount() > 1;
}

/**
* Check if store is default
*
* @return boolean
* @since 100.1.0
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Check if store is default
*
* @return boolean
* @since 100.1.0
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function isDefault()
{
if (!$this->getId() && $this->getWebsite() && $this->getWebsite()->getStoresCount() == 0) {
Expand All @@ -1174,16 +1174,16 @@ public function isDefault()
return $this->getGroup()->getDefaultStoreId() == $this->getId();
}

/**
* Retrieve current url for store
*
* @param bool $fromStore
*
* @return string
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve current url for store
*
* @param bool $fromStore
*
* @return string
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
* @SuppressWarnings(PHPMD.NPathComplexity)
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getCurrentUrl($fromStore = true)
{
$sidQueryParam = $this->_sidResolver->getSessionIdQueryParam($this->_getSession());
Expand Down Expand Up @@ -1254,24 +1254,24 @@ public function isActive()
return (bool)$this->_getData('is_active');
}

/**
* Protect delete from non admin area
*
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
/**
* Protect delete from non admin area
*
* @return $this
* @throws \Magento\Framework\Exception\LocalizedException
*/
public function beforeDelete()
{
$this->_configDataResource->clearScopeData(ScopeInterface::SCOPE_STORES, $this->getId());
return parent::beforeDelete();
}

/**
* Rewrite in order to clear configuration cache
*
* @return $this
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Rewrite in order to clear configuration cache
*
* @return $this
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function afterDelete()
{
$store = $this;
Expand Down Expand Up @@ -1326,12 +1326,12 @@ public function isReadOnly($value = null)
return $this->_isReadOnly;
}

/**
* Retrieve store group name
*
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
/**
* Retrieve store group name
*
* @return string
* @throws \Magento\Framework\Exception\NoSuchEntityException
*/
public function getFrontendName()
{
if (null === $this->_frontendName) {
Expand Down
Loading

0 comments on commit 46fdf6d

Please sign in to comment.