Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions app/code/Magento/Ui/Model/Export/ConvertToCsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -17,7 +16,7 @@
class ConvertToCsv
{
/**
* @var WriteInterface
* @var DirectoryList
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there's some mistake. In the constructor we init $directory property as a result of $filesystem->getDirectoryWrite() method, which creates an instance of Magento\Framework\Filesystem\Directory\Write using the corresponding factory. So, basically, it returns WriteInterface but not DirectoryList. The same situation is for the ConvertToXml class.
Please, correct me if I'm wrong.

*/
protected $directory;

Expand Down
3 changes: 1 addition & 2 deletions app/code/Magento/Ui/Model/Export/ConvertToXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Magento\Framework\Convert\ExcelFactory;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem;
use Magento\Framework\Filesystem\Directory\WriteInterface;
use Magento\Ui\Component\MassAction\Filter;

/**
Expand All @@ -21,7 +20,7 @@
class ConvertToXml
{
/**
* @var WriteInterface
* @var DirectoryList
*/
protected $directory;

Expand Down