Skip to content

Commit c7566a7

Browse files
committed
update constructor in Gendiff
1 parent 4bafc1c commit c7566a7

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

src/Gendiff.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@
44

55
function runGendiff(): void
66
{
7-
$consoleApp = new ConsoleApp();
7+
$docopt = <<<'DOCOPT'
8+
gendiff -h
9+
10+
Generate diff
11+
12+
Usage:
13+
gendiff (-h|--help)
14+
gendiff (-v|--version)
15+
gendiff [Options]... FILE1 FILE2
16+
17+
Options:
18+
-h --help Show this screen
19+
-v --version Show version
20+
--format <fmt> Report format [default: stylish]
21+
22+
DOCOPT;
23+
24+
$commandFactory = new CommandFactory($docopt);
25+
$fileReader = new FileReader();
26+
27+
$consoleApp = new ConsoleApp($commandFactory, $fileReader);
828
$consoleApp->run();
929
}

0 commit comments

Comments
 (0)