16
16
use phpDocumentor \Guides \Event \PostCollectFilesForParsingEvent ;
17
17
use phpDocumentor \Guides \Event \PostParseDocument ;
18
18
use phpDocumentor \Guides \Event \PostParseProcess ;
19
+ use phpDocumentor \Guides \Event \PostProjectNodeCreated ;
19
20
use phpDocumentor \Guides \Event \PostRenderDocument ;
20
21
use phpDocumentor \Guides \Event \PostRenderProcess ;
21
22
use phpDocumentor \Guides \Event \PreParseDocument ;
41
42
use Symfony \Component \EventDispatcher \EventDispatcher ;
42
43
43
44
use function array_pop ;
45
+ use function assert ;
44
46
use function count ;
45
47
use function getcwd ;
46
48
use function implode ;
@@ -199,7 +201,7 @@ static function (PostRenderProcess $event) use ($renderingProgressBar, $renderin
199
201
);
200
202
}
201
203
202
- private function getSettingsOverridenWithInput (InputInterface $ input ): ProjectSettings
204
+ private function getSettingsOverriddenWithInput (InputInterface $ input ): ProjectSettings
203
205
{
204
206
$ settings = $ this ->settingsManager ->getProjectSettings ();
205
207
@@ -249,7 +251,7 @@ private function getSettingsOverridenWithInput(InputInterface $input): ProjectSe
249
251
250
252
protected function execute (InputInterface $ input , OutputInterface $ output ): int
251
253
{
252
- $ settings = $ this ->getSettingsOverridenWithInput ($ input );
254
+ $ settings = $ this ->getSettingsOverriddenWithInput ($ input );
253
255
$ inputDir = $ this ->getAbsolutePath ($ settings ->getInput ());
254
256
if (!is_dir ($ inputDir )) {
255
257
throw new RuntimeException (sprintf ('Input directory "%s" was not found! ' . "\n" .
@@ -264,6 +266,12 @@ protected function execute(InputInterface $input, OutputInterface $output): int
264
266
$ this ->clock ->now (),
265
267
);
266
268
269
+ $ event = new PostProjectNodeCreated ($ projectNode , $ settings );
270
+ $ event = $ this ->eventDispatcher ->dispatch ($ event );
271
+ assert ($ event instanceof PostProjectNodeCreated);
272
+ $ projectNode = $ event ->getProjectNode ();
273
+ $ settings = $ event ->getSettings ();
274
+
267
275
$ outputDir = $ this ->getAbsolutePath ($ settings ->getOutput ());
268
276
$ sourceFileSystem = new Filesystem (new Local ($ settings ->getInput ()));
269
277
$ sourceFileSystem ->addPlugin (new Finder ());
0 commit comments