Skip to content

Commit d50a764

Browse files
committed
Fixed coding standard violations in the Framework\Archive namespace:
- Removed @codingStandardsIgnoreFile - Fixed indentation - Fixed number of chars per line - Removed unused "use" namespace at the top of the file.
1 parent e3fc5b7 commit d50a764

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

lib/internal/Magento/Framework/Archive/Helper/File.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
10-
* Helper class that simplifies files stream reading and writing
11-
*/
8+
* Helper class that simplifies files stream reading and writing
9+
*/
1210
namespace Magento\Framework\Archive\Helper;
1311

1412
use Magento\Framework\Exception\LocalizedException;
15-
use Magento\Framework\Filesystem\DriverInterface;
1613

1714
class File
1815
{
@@ -98,7 +95,10 @@ public function open($mode = 'w+', $chmod = null)
9895
if ($this->_isInWriteMode) {
9996
if (!is_writable($this->_fileLocation)) {
10097
throw new LocalizedException(
101-
new \Magento\Framework\Phrase('Permission denied to write to %1', [$this->_fileLocation])
98+
new \Magento\Framework\Phrase(
99+
'Permission denied to write to %1',
100+
[$this->_fileLocation]
101+
)
102102
);
103103
}
104104

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

201201
if (false === $this->_fileHandler) {
202-
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath]));
202+
throw new LocalizedException(
203+
new \Magento\Framework\Phrase('Failed to open file %1', [$this->_filePath])
204+
);
203205
}
204206
}
205207

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

217219
if (false === $result) {
218-
throw new LocalizedException(new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath]));
220+
throw new LocalizedException(
221+
new \Magento\Framework\Phrase('Failed to write data to %1', [$this->_filePath])
222+
);
219223
}
220224
}
221225

@@ -293,4 +297,4 @@ protected function _checkFileOpened()
293297
throw new LocalizedException(new \Magento\Framework\Phrase('File not opened'));
294298
}
295299
}
296-
}
300+
}

lib/internal/Magento/Framework/Archive/Helper/File/Gz.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
10-
* Helper class that simplifies gz files stream reading and writing
11-
*/
8+
* Helper class that simplifies gz files stream reading and writing
9+
*/
1210
namespace Magento\Framework\Archive\Helper\File;
1311

1412
class Gz extends \Magento\Framework\Archive\Helper\File
@@ -68,4 +66,4 @@ protected function _close()
6866
{
6967
gzclose($this->_fileHandler);
7068
}
71-
}
69+
}

0 commit comments

Comments
 (0)