Skip to content

Commit 37af382

Browse files
authored
Merge pull request #438 from PHPCSStandards/feature/cs-don't-join
CS: use `implode()` not `join()`
2 parents 23c79fc + 96d3fd9 commit 37af382

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function process(File $phpcsFile, $stackPtr)
8989

9090
if (count($diff) !== 0) {
9191
$error = 'Loop incrementor (%s) jumbling with inner loop';
92-
$data = [join(', ', $diff)];
92+
$data = [implode(', ', $diff)];
9393
$phpcsFile->addWarning($error, $stackPtr, 'Found', $data);
9494
}
9595
}

src/Standards/Squiz/Sniffs/Debug/JavaScriptLintSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function process(File $phpcsFile, $stackPtr)
6767
// provide useful error reporting.
6868
if ($retval === 2 || $retval === 4) {
6969
if (is_array($output) === true) {
70-
$msg = join('\n', $output);
70+
$msg = implode('\n', $output);
7171
}
7272

7373
throw new RuntimeException("Failed invoking JavaScript Lint, retval was [$retval], output was [$msg]");

src/Standards/Zend/Sniffs/Debug/CodeAnalyzerSniff.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function process(File $phpcsFile, $stackPtr)
6969
// provide useful error reporting.
7070
if (is_numeric($exitCode) === true && $exitCode > 0) {
7171
if (is_array($output) === true) {
72-
$msg = join('\n', $output);
72+
$msg = implode('\n', $output);
7373
}
7474

7575
throw new RuntimeException("Failed invoking ZendCodeAnalyzer, exitcode was [$exitCode], retval was [$retval], output was [$msg]");

0 commit comments

Comments
 (0)