Skip to content

Commit

Permalink
Fixed incorrect dependencies errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed May 19, 2016
1 parent 3da1c66 commit 396084d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 28 deletions.
10 changes: 2 additions & 8 deletions Block/Widgets/SideReview.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,21 @@ class SideReview extends \Magento\Framework\View\Element\Template
* Default template to use for review widget
*/
const DEFAULT_REVIEW_TEMPLATE = 'widgets/sidereview.phtml';
/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface
*/
protected $scopeConfig;

/**
* Construct
*
* @param \Magento\Framework\View\Element\Template\Context $context
* @param \Swissup\Testimonials\Model\ResourceModel\Data\CollectionFactory $testimonialsCollectionFactory
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param array $data
*/
public function __construct(
\Magento\Framework\View\Element\Template\Context $context,
\Swissup\Testimonials\Model\ResourceModel\Data\CollectionFactory $testimonialsCollectionFactory,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
array $data = []
) {
parent::__construct($context, $data);
$this->_testimonialsCollectionFactory = $testimonialsCollectionFactory;
$this->scopeConfig = $scopeConfig;
}

public function _construct()
Expand Down Expand Up @@ -67,7 +61,7 @@ public function getListUrl()
}
public function getStoreName()
{
$storeName = $this->scopeConfig->getValue(
$storeName = $this->_scopeConfig->getValue(
'general/store_information/name',
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
);
Expand Down
21 changes: 1 addition & 20 deletions Helper/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,28 +116,9 @@ class Config extends AbstractHelper
*/
const XML_PATH_ADMIN_EMAIL_TEMPLATE = 'testimonials/email_admin/email_template';

/**
* @var \Magento\Framework\App\Config\ScopeConfigInterface
*/
protected $_scopeConfig;
/**
* Constructor
*
* @param \Magento\Framework\App\Helper\Context $context
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
*/
public function __construct(
\Magento\Framework\App\Helper\Context $context,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
)
{
parent::__construct($context);
$this->_scopeConfig = $scopeConfig;
}
protected function _getConfig($key)
{
return $this->_scopeConfig->getValue($key, ScopeInterface::SCOPE_STORE);
return $this->scopeConfig->getValue($key, ScopeInterface::SCOPE_STORE);
}
public function isAutoApprove()
{
Expand Down

0 comments on commit 396084d

Please sign in to comment.