File tree Expand file tree Collapse file tree 1 file changed +17
-6
lines changed
Expand file tree Collapse file tree 1 file changed +17
-6
lines changed Original file line number Diff line number Diff line change 88use Photobooth \Service \ApplicationService ;
99use Symfony \Component \Console \Application as BaseApplication ;
1010
11- /**
12- * @method void add(\Symfony\Component\Console\Command\Command $command)
13- */
1411class Application extends BaseApplication
1512{
1613 protected array $ photoboothConfig = [];
1714
1815 public function __construct (array $ photoboothConfig )
1916 {
2017 $ this ->photoboothConfig = $ photoboothConfig ;
21- parent ::__construct ('Photobooth ' , ApplicationService::getInstance ()->getVersion ());
22- $ this ->add ((new Command \ConfigListCommand ())->setPhotoboothConfig ($ this ->photoboothConfig ));
23- $ this ->add ((new Command \EnvironmentListCommand ()));
18+
19+ parent ::__construct (
20+ 'Photobooth ' ,
21+ ApplicationService::getInstance ()->getVersion ()
22+ );
23+ }
24+
25+ protected function getDefaultCommands (): array
26+ {
27+ return array_merge (
28+ parent ::getDefaultCommands (),
29+ [
30+ (new Command \ConfigListCommand ())
31+ ->setPhotoboothConfig ($ this ->photoboothConfig ),
32+ new Command \EnvironmentListCommand (),
33+ ]
34+ );
2435 }
2536}
You can’t perform that action at this time.
0 commit comments