Skip to content

Commit 04026bd

Browse files
committed
Fixed coding standard violations in the Framework\File namespace, so that it will be checked bij PHP CS and no longer be ignored while doing CI checks. Made the following changes:
- Removed @codingStandardsIgnoreFile from the head of the file - Fixed indentation - Fixed missing parameter variable in docblock comment - Fixed camel case strings in function
1 parent c3040d3 commit 04026bd

File tree

4 files changed

+13
-21
lines changed

4 files changed

+13
-21
lines changed

lib/internal/Magento/Framework/File/Csv.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Framework\File;
108

119
use Magento\Framework\Filesystem\Driver\File;

lib/internal/Magento/Framework/File/CsvMulty.php

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

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* Csv parse
119
*
@@ -27,25 +25,23 @@ public function getDataPairs($file, $keyIndex = 0, $valueIndex = 1)
2725
{
2826
$data = [];
2927
$csvData = $this->getData($file);
30-
$line_number = 0;
28+
$lineNumber = 0;
3129
foreach ($csvData as $rowData) {
32-
$line_number++;
30+
$lineNumber++;
3331
if (isset($rowData[$keyIndex])) {
3432
if (isset($data[$rowData[$keyIndex]])) {
3533
if (isset($data[$rowData[$keyIndex]]['duplicate'])) {
36-
#array_push($data[$rowData[$keyIndex]]['duplicate'],array('line' => $line_number,'value' => isset($rowData[$valueIndex]) ? $rowData[$valueIndex] : null));
37-
$data[$rowData[$keyIndex]]['duplicate']['line'] .= ', ' . $line_number;
34+
$data[$rowData[$keyIndex]]['duplicate']['line'] .= ', ' . $lineNumber;
3835
} else {
39-
$tmp_value = $data[$rowData[$keyIndex]]['value'];
40-
$tmp_line = $data[$rowData[$keyIndex]]['line'];
36+
$tmpValue = $data[$rowData[$keyIndex]]['value'];
37+
$tmpLine = $data[$rowData[$keyIndex]]['line'];
4138
$data[$rowData[$keyIndex]]['duplicate'] = [];
42-
#array_push($data[$rowData[$keyIndex]]['duplicate'],array('line' => $tmp_line.' ,'.$line_number,'value' => $tmp_value));
43-
$data[$rowData[$keyIndex]]['duplicate']['line'] = $tmp_line . ' ,' . $line_number;
44-
$data[$rowData[$keyIndex]]['duplicate']['value'] = $tmp_value;
39+
$data[$rowData[$keyIndex]]['duplicate']['line'] = $tmpLine . ' ,' . $lineNumber;
40+
$data[$rowData[$keyIndex]]['duplicate']['value'] = $tmpValue;
4541
}
4642
} else {
4743
$data[$rowData[$keyIndex]] = [];
48-
$data[$rowData[$keyIndex]]['line'] = $line_number;
44+
$data[$rowData[$keyIndex]]['line'] = $lineNumber;
4945
$data[$rowData[$keyIndex]]['value'] = isset($rowData[$valueIndex]) ? $rowData[$valueIndex] : null;
5046
}
5147
}

lib/internal/Magento/Framework/File/Test/Unit/CsvTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Framework\File\Test\Unit;
108

119
use Magento\Framework\Filesystem\Driver\File;

lib/internal/Magento/Framework/File/Transfer/Adapter/Http.php

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

7-
// @codingStandardsIgnoreFile
8-
97
namespace Magento\Framework\File\Transfer\Adapter;
108

119
class Http
@@ -21,11 +19,13 @@ class Http
2119
private $mime;
2220

2321
/**
24-
* @param \Magento\Framework\App\Response\Http
22+
* @param \Magento\Framework\App\Response\Http $response
2523
* @param \Magento\Framework\File\Mime $mime
2624
*/
27-
public function __construct(\Magento\Framework\HTTP\PhpEnvironment\Response $response, \Magento\Framework\File\Mime $mime)
28-
{
25+
public function __construct(
26+
\Magento\Framework\HTTP\PhpEnvironment\Response $response,
27+
\Magento\Framework\File\Mime $mime
28+
) {
2929
$this->response = $response;
3030
$this->mime = $mime;
3131
}

0 commit comments

Comments
 (0)