@@ -213,7 +213,7 @@ public function run(InputInterface $input = null, OutputInterface $output = null
213
213
*
214
214
* @return int 0 if everything went fine, or an error code
215
215
*/
216
- public function doRun (InputInterface $ input , OutputInterface $ output )
216
+ public function doRun (InputInterface $ input , OutputInterface $ output ): int
217
217
{
218
218
if (true === $ input ->hasParameterOption (['--version ' , '-V ' ], true )) {
219
219
$ output ->writeln ($ this ->getLongVersion ());
@@ -437,7 +437,7 @@ public function setVersion(string $version)
437
437
*
438
438
* @return string The long application version
439
439
*/
440
- public function getLongVersion ()
440
+ public function getLongVersion (): string
441
441
{
442
442
if ('UNKNOWN ' !== $ this ->getName ()) {
443
443
if ('UNKNOWN ' !== $ this ->getVersion ()) {
@@ -482,7 +482,7 @@ public function addCommands(array $commands)
482
482
*
483
483
* @return Command|null The registered command if enabled or null
484
484
*/
485
- public function add (Command $ command )
485
+ public function add (Command $ command ): ? Command
486
486
{
487
487
$ this ->init ();
488
488
@@ -519,7 +519,7 @@ public function add(Command $command)
519
519
*
520
520
* @throws CommandNotFoundException When given command name does not exist
521
521
*/
522
- public function get (string $ name )
522
+ public function get (string $ name ): Command
523
523
{
524
524
$ this ->init ();
525
525
@@ -630,7 +630,7 @@ public function findNamespace(string $namespace)
630
630
*
631
631
* @throws CommandNotFoundException When command name is incorrect or ambiguous
632
632
*/
633
- public function find (string $ name )
633
+ public function find (string $ name ): Command
634
634
{
635
635
$ this ->init ();
636
636
@@ -740,7 +740,7 @@ public function find(string $name)
740
740
*
741
741
* @return Command[]
742
742
*/
743
- public function all (string $ namespace = null )
743
+ public function all (string $ namespace = null ): array
744
744
{
745
745
$ this ->init ();
746
746
@@ -939,7 +939,7 @@ protected function configureIO(InputInterface $input, OutputInterface $output)
939
939
*
940
940
* @return int 0 if everything went fine, or an error code
941
941
*/
942
- protected function doRunCommand (Command $ command , InputInterface $ input , OutputInterface $ output )
942
+ protected function doRunCommand (Command $ command , InputInterface $ input , OutputInterface $ output ): int
943
943
{
944
944
foreach ($ command ->getHelperSet () as $ helper ) {
945
945
if ($ helper instanceof InputAwareInterface) {
0 commit comments