File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 2222 return $ c ->get ('wordpress/plugin_factory ' );
2323 },
2424 'wordpress/plugin_factory ' => function (ContainerInterface $ c ): FilePathPluginFactoryInterface {
25- return new FilePathPluginFactory ($ c ->get ('package/version_factory ' ));
25+ $ factory = $ c ->get ('package/version_factory ' );
26+ /** @var StringVersionFactoryInterface $factory */
27+ return new FilePathPluginFactory ($ factory );
2628 },
2729 'me/plugin/version_factory ' => function (ContainerInterface $ c ): StringVersionFactoryInterface {
2830 return $ c ->get ('package/version_factory ' );
Original file line number Diff line number Diff line change 88 $ rootDir = dirname ($ mainFile );
99 $ moduleDir = dirname (__FILE__ );
1010 $ moduleIncDir = "$ moduleDir/inc " ;
11+
1112 /** @psalm-suppress UnresolvableInclude */
1213 $ factories = (require "$ moduleIncDir/factories.php " )($ rootDir , $ mainFile );
1314 /** @psalm-suppress UnresolvableInclude */
1415 $ extensions = (require "$ moduleIncDir/extensions.php " )($ rootDir , $ mainFile );
16+ /**
17+ * @var array<array-key, callable> $factories
18+ * @var array<array-key, callable> $extensions
19+ */
20+
1521 $ provider = new ServiceProvider ($ factories , $ extensions );
1622 $ module = new Module ($ provider );
1723
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public function setup(): ServiceProviderInterface
3636 foreach ($ this ->modules as $ module ) {
3737 $ providers [] = $ module ->setup ();
3838 }
39+ /** @var list<ServiceProviderInterface> $providers */
3940
4041 return new CompositeCachingServiceProvider ($ providers );
4142 }
You can’t perform that action at this time.
0 commit comments