Skip to content

Commit 2d0aa18

Browse files
Add more return types after fixing a typo in my script
1 parent 36b04ce commit 2d0aa18

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

Command/AssetsInstallCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ protected function configure()
9595
/**
9696
* {@inheritdoc}
9797
*/
98-
protected function execute(InputInterface $input, OutputInterface $output)
98+
protected function execute(InputInterface $input, OutputInterface $output): int
9999
{
100100
/** @var KernelInterface $kernel */
101101
$kernel = $this->getApplication()->getKernel();

Command/ConfigDumpReferenceCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ protected function configure()
7474
*
7575
* @throws \LogicException
7676
*/
77-
protected function execute(InputInterface $input, OutputInterface $output)
77+
protected function execute(InputInterface $input, OutputInterface $output): int
7878
{
7979
$io = new SymfonyStyle($input, $output);
8080
$errorIo = $io->getErrorStyle();
@@ -86,7 +86,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
8686
'For dumping a specific option, add its path as the second argument of this command. (e.g. <comment>config:dump-reference FrameworkBundle profiler.matcher</comment> to dump the <comment>framework.profiler.matcher</comment> configuration)',
8787
]);
8888

89-
return null;
89+
return 0;
9090
}
9191

9292
$extension = $this->findExtension($name);
@@ -130,6 +130,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
130130

131131
$io->writeln(null === $path ? $dumper->dump($configuration, $extension->getNamespace()) : $dumper->dumpAtPath($configuration, $path));
132132

133-
return null;
133+
return 0;
134134
}
135135
}

Command/DebugAutowiringCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ protected function configure()
6969
/**
7070
* {@inheritdoc}
7171
*/
72-
protected function execute(InputInterface $input, OutputInterface $output)
72+
protected function execute(InputInterface $input, OutputInterface $output): int
7373
{
7474
$io = new SymfonyStyle($input, $output);
7575
$errorIo = $io->getErrorStyle();
@@ -146,7 +146,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
146146

147147
$io->newLine();
148148

149-
return null;
149+
return 0;
150150
}
151151

152152
private function getFileLink(string $class): string

Command/RouterMatchCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function configure()
7171
/**
7272
* {@inheritdoc}
7373
*/
74-
protected function execute(InputInterface $input, OutputInterface $output)
74+
protected function execute(InputInterface $input, OutputInterface $output): int
7575
{
7676
$io = new SymfonyStyle($input, $output);
7777

@@ -114,6 +114,6 @@ protected function execute(InputInterface $input, OutputInterface $output)
114114
return 1;
115115
}
116116

117-
return null;
117+
return 0;
118118
}
119119
}

Command/TranslationUpdateCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function configure()
102102
/**
103103
* {@inheritdoc}
104104
*/
105-
protected function execute(InputInterface $input, OutputInterface $output)
105+
protected function execute(InputInterface $input, OutputInterface $output): int
106106
{
107107
$io = new SymfonyStyle($input, $output);
108108
$errorIo = $io->getErrorStyle();
@@ -236,7 +236,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
236236
if (!\count($operation->getDomains())) {
237237
$errorIo->warning('No translation messages were found.');
238238

239-
return null;
239+
return 0;
240240
}
241241

242242
$resultMessage = 'Translation files were successfully updated';
@@ -302,7 +302,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
302302

303303
$errorIo->success($resultMessage.'.');
304304

305-
return null;
305+
return 0;
306306
}
307307

308308
private function filterCatalogue(MessageCatalogue $catalogue, string $domain): MessageCatalogue

0 commit comments

Comments
 (0)