Skip to content

Commit

Permalink
MAGETWO-67498: Fixed coding standard violations in the Framework\Arch…
Browse files Browse the repository at this point in the history
…ive namespace #9250
  • Loading branch information
vrann authored Apr 19, 2017
2 parents 3363c93 + 36531a6 commit 635dfd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
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

0 comments on commit 635dfd6

Please sign in to comment.