Skip to content

Commit 80d71da

Browse files
committed
update DisplayCommand
1 parent 54c7af6 commit 80d71da

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/DisplayCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ private function constructContent($accum, $item)
2020

2121
public function execute(CommandInterface $command = null): CommandInterface
2222
{
23-
$file1Content = $command->getFilesContent()['FILE1'];
24-
$file2Content = $command->getFilesContent()['FILE2'];
23+
$filesContent = $command->getFilesContent();
24+
$keys = array_keys($filesContent);
25+
$file1Content = $filesContent[$keys[0]];
26+
$file2Content = $filesContent[$keys[1]];
2527

2628
$this->filesContent[] = "file1.json content:\n";
2729
$this->filesContent[] = array_reduce(

0 commit comments

Comments
 (0)