Skip to content

Commit 566df6b

Browse files
committed
update CommandLineParser class
1 parent 17a1f5d commit 566df6b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/CommandLineParser.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,14 @@ public function execute(CommandInterface $command = null): CommandInterface
2323

2424
public function setFileNames(array $fileNames): CommandInterface
2525
{
26-
$this->args["FILE1"] = $fileNames["FILE1"];
27-
$this->args["FILE2"] = $fileNames["FILE2"];
28-
26+
$keys = array_keys($fileNames);
27+
foreach ($keys as $key) {
28+
$this->args[$key] = $fileNames[$key];
29+
}
2930
return $this;
3031
}
3132

32-
public function getFileNames()
33+
public function getFileNames(): array
3334
{
3435
return $this->args;
3536
}

0 commit comments

Comments
 (0)