Skip to content

Commit efdda4d

Browse files
authored
Fix mentions of Symfony\Finder to StubsGenerator\Finder (#37)
The help documentation on the command states that the finder file should return a `Symfony\Finder` instance when the command actual checks for a `StubsGenerator\Finder` instance. This commit updates the command to correctly state what it looks for.
1 parent 0fff1c3 commit efdda4d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/GenerateStubsCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function configure(): void
5858
->addArgument('sources', InputArgument::IS_ARRAY, 'The sources from which to generate stubs. Either directories or specific files. At least one must be specified, unless --finder is specified.')
5959
->addOption('out', null, InputOption::VALUE_REQUIRED, 'Path to a file to write pretty-printed stubs to. If unset, stubs will be written to stdout.')
6060
->addOption('force', null, InputOption::VALUE_NONE, 'Whether to force an overwrite.')
61-
->addOption('finder', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `Symfony\Finder` instance including the set of files that should be parsed. Can be used instead of, but not in addition to, passing sources directly.')
61+
->addOption('finder', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `StubsGenerator\Finder` instance including the set of files that should be parsed. Can be used instead of, but not in addition to, passing sources directly.')
6262
->addOption('visitor', null, InputOption::VALUE_REQUIRED, 'Path to a PHP file which returns a `StubsGenerator\NodeVisitor` instance to replace the default node visitor.')
6363
->addOption('header', null, InputOption::VALUE_REQUIRED, 'A doc comment to prepend to the top of the generated stubs file. (Will be added below the opening `<?php` tag.)', '')
6464
->addOption('nullify-globals', null, InputOption::VALUE_NONE, 'Initialize all global variables with a value of `null`, instead of their assigned value.')
@@ -198,10 +198,10 @@ private function parseSources(InputInterface $input): Finder
198198
try {
199199
$finder = @include $finderPath;
200200
} catch (Exception $e) {
201-
throw new RuntimeException("Could not resolve a `Symfony\Finder` from '$finderPath'.", 0, $e);
201+
throw new RuntimeException("Could not resolve a `StubsGenerator\Finder` from '$finderPath'.", 0, $e);
202202
}
203203
if (!$finder || !($finder instanceof Finder)) {
204-
throw new RuntimeException("Could not resolve a `Symfony\Finder` from '$finderPath'.");
204+
throw new RuntimeException("Could not resolve a `StubsGenerator\Finder` from '$finderPath'.");
205205
}
206206
return $finder;
207207
}

0 commit comments

Comments
 (0)