Skip to content

Commit 2b61045

Browse files
committed
added stylish method to FilesDiffCommand
1 parent 6fd63f8 commit 2b61045

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/FilesDiffCommand.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private function normalizeData($data)
3232
$normalizedValue = array_map(
3333
fn ($item) => $this->normalizeData($item),
3434
$data
35-
);
35+
);
3636
}
3737

3838
return $normalizedValue;
@@ -43,13 +43,13 @@ private function stylish(array $differenceContent): array
4343
return array_map(
4444
function ($differenceItem) {
4545
$result = null;
46-
if (!strcmp($differenceItem["status"],"not changed")) {
46+
if (!strcmp($differenceItem["status"], "not changed")) {
4747
$result = " " .
4848
$differenceItem["fileKey"] .
4949
": " .
5050
$differenceItem["file1Content"] .
5151
"\n";
52-
} elseif (!strcmp($differenceItem["status"],"changed")) {
52+
} elseif (!strcmp($differenceItem["status"], "changed")) {
5353
$result = " - " .
5454
$differenceItem["fileKey"] .
5555
": " .
@@ -60,13 +60,13 @@ function ($differenceItem) {
6060
": " .
6161
$differenceItem["file2Content"] .
6262
"\n";
63-
} else if (!strcmp($differenceItem["status"],"added")) {
63+
} elseif (!strcmp($differenceItem["status"], "added")) {
6464
$result = " + " .
6565
$differenceItem["fileKey"] .
6666
": " .
6767
$differenceItem["file2Content"] .
68-
"\n";
69-
} else if (!strcmp($differenceItem["status"],"deleted")) {
68+
"\n";
69+
} elseif (!strcmp($differenceItem["status"], "deleted")) {
7070
$result = " - " .
7171
$differenceItem["fileKey"] .
7272
": " .
@@ -181,7 +181,7 @@ public function execute(CommandInterface $command = null): CommandInterface
181181
$file1Keys = array_keys($file1Content);
182182
$file2Keys = array_keys($file2Content);
183183
$mergedFileKeys = array_unique(array_merge($file1Keys, $file2Keys));
184-
184+
185185
$contentAnalysisResult = $this->getDifference(
186186
$mergedFileKeys,
187187
$file1Content,

0 commit comments

Comments
 (0)