Skip to content

Commit

Permalink
Merge pull request #790 from magento-engcom/develop-prs
Browse files Browse the repository at this point in the history
[EngCom] Public Pull Requests
  • Loading branch information
Oleksii Korshenko authored Feb 1, 2017
2 parents c1390c8 + ff9577f commit 0aff845
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class ThemeId implements \Magento\Framework\Option\ArrayInterface
protected $_resourceModel;

/**
* @param \Magento\Theme\Model\ResourceModel\Theme\Collection $widgetResourceModel
* @param \Magento\Theme\Model\ResourceModel\Theme\CollectionFactory $widgetResourceModel
*/
public function __construct(\Magento\Theme\Model\ResourceModel\Theme\Collection $widgetResourceModel)
public function __construct(\Magento\Theme\Model\ResourceModel\Theme\CollectionFactory $widgetResourceModel)
{
$this->_resourceModel = $widgetResourceModel;
$this->_resourceModel = $widgetResourceModel->create();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function getConstructorArguments(\ReflectionClass $class, $groupByPositio
/**
* Skip native PHP types, classes without constructor
*/
if (!$class->getFileName() || false == $class->hasMethod(
if ($class->isInterface() || !$class->getFileName() || false == $class->hasMethod(
'__construct'
) || !$inherited && $class->getConstructor()->class != $class->getName()
) {
Expand Down
8 changes: 6 additions & 2 deletions setup/src/Magento/Setup/Module/I18n/Dictionary/Writer/Csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,18 @@ public function write(Phrase $phrase)
*/
public function __destructor()
{
fclose($this->_fileHandler);
if (is_resource($this->_fileHandler)) {
fclose($this->_fileHandler);
}
}

/**
* Destructor for closing file handler
*/
public function __destruct()
{
fclose($this->_fileHandler);
if (is_resource($this->_fileHandler)) {
fclose($this->_fileHandler);
}
}
}

0 comments on commit 0aff845

Please sign in to comment.