Skip to content

Commit 2b2b203

Browse files
committed
improved maintainability
1 parent 5e94d25 commit 2b2b203

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/ConsoleApp.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class ConsoleApp
77
private CommandInterface $currentCommand;
88
private CommandInterface $nextCommand;
99
private CommandFactoryInterface $commandFactory;
10-
private FileReaderInterface $fileReader;
1110

1211
public function __construct(
1312
CommandFactoryInterface $commandFactory

src/DocoptDouble.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function __construct()
1717
];
1818
}
1919

20-
public function handle(string $data, array $default)
20+
public function handle()
2121
{
2222
return $this;
2323
}

src/FilesDiffCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ function ($fileKey) use ($file1Content, $file2Content) {
8383
array_key_exists($fileKey, $file1Content) &&
8484
!strcmp($file1Content[$fileKey], $file2Content[$fileKey])
8585
) {
86-
return " " . $fileKey . ": " . $this->normalizeData($file1Content[$fileKey]) . "\n";
86+
$result = " " . $fileKey . ": " . $this->normalizeData($file1Content[$fileKey]) . "\n";
8787
} elseif (array_key_exists($fileKey, $file1Content)) {
88-
return " - " . $fileKey . ": " . $this->normalizeData($file1Content[$fileKey]) . "\n" .
88+
$result = " - " . $fileKey . ": " . $this->normalizeData($file1Content[$fileKey]) . "\n" .
8989
" + " . $fileKey . ": " . $this->normalizeData($file2Content[$fileKey]) . "\n";
9090
} else {
91-
return " + " . $fileKey . ": " . $this->normalizeData($file2Content[$fileKey]) . "\n";
91+
$result = " + " . $fileKey . ": " . $this->normalizeData($file2Content[$fileKey]) . "\n";
9292
}
93+
return $result;
9394
} else {
9495
return " - " . $fileKey . ": " . $this->normalizeData($file1Content[$fileKey]) . "\n";
9596
}

0 commit comments

Comments
 (0)