Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed coding standard violations in the Framework\Archive namespace #9250

Merged
merged 2 commits into from
Apr 19, 2017
Merged
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
20 changes: 12 additions & 8 deletions lib/internal/Magento/Framework/Archive/Helper/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* Helper class that simplifies files stream reading and writing
*/
* Helper class that simplifies files stream reading and writing
*/
namespace Magento\Framework\Archive\Helper;

use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\Filesystem\DriverInterface;

class File
{
Expand Down Expand Up @@ -98,7 +95,10 @@ public function open($mode = 'w+', $chmod = null)
if ($this->_isInWriteMode) {
if (!is_writable($this->_fileLocation)) {
throw new LocalizedException(
new \Magento\Framework\Phrase('Permission denied to write to %1', [$this->_fileLocation])
new \Magento\Framework\Phrase(
'Permission denied to write to %1',
[$this->_fileLocation]
)
);
}

Expand Down Expand Up @@ -199,7 +199,9 @@ protected function _open($mode)
$this->_fileHandler = @fopen($this->_filePath, $mode);

if (false === $this->_fileHandler) {
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath]));
throw new LocalizedException(
new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath])
);
}
}

Expand All @@ -215,7 +217,9 @@ protected function _write($data)
$result = @fwrite($this->_fileHandler, $data);

if (false === $result) {
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath]));
throw new LocalizedException(
new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath])
);
}
}

Expand Down
6 changes: 2 additions & 4 deletions lib/internal/Magento/Framework/Archive/Helper/File/Gz.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
* See COPYING.txt for license details.
*/

// @codingStandardsIgnoreFile

/**
* Helper class that simplifies gz files stream reading and writing
*/
* Helper class that simplifies gz files stream reading and writing
*/
namespace Magento\Framework\Archive\Helper\File;

class Gz extends \Magento\Framework\Archive\Helper\File
Expand Down