diff --git a/Command/DumpCommand.php b/Command/DumpCommand.php index 69378e1..3a4d684 100644 --- a/Command/DumpCommand.php +++ b/Command/DumpCommand.php @@ -58,7 +58,7 @@ class DumpCommand extends Command ; } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $format = $input->getOption('format'); $view = $input->getOption('view'); diff --git a/Command/SwaggerDumpCommand.php b/Command/SwaggerDumpCommand.php index 067e833..4146df0 100644 --- a/Command/SwaggerDumpCommand.php +++ b/Command/SwaggerDumpCommand.php @@ -62,7 +62,7 @@ class SwaggerDumpCommand extends Command ; } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $extractor = $this->container->get('nelmio_api_doc.extractor.api_doc_extractor'); $this->formatter = $this->container->get('nelmio_api_doc.formatter.swagger_formatter'); @@ -77,7 +77,7 @@ class SwaggerDumpCommand extends Command $data = $this->getResourceList($apiDocs, $output); $this->dump($data, null, $input, $output); - return; + return 0; } if (false != ($resource = $input->getOption('resource'))) { @@ -87,7 +87,7 @@ class SwaggerDumpCommand extends Command } $this->dump($data, $resource, $input, $output); - return; + return 0; } /* @@ -112,6 +112,8 @@ class SwaggerDumpCommand extends Command $data = $this->getApiDeclaration($apiDocs, $resource, $output); $this->dump($data, $resource, $input, $output, false); } + + return 0; } protected function dump(array $data, $resource, InputInterface $input, OutputInterface $output, $treatAsFile = true) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index a2cecf6..69fc68c 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface; class Configuration implements ConfigurationInterface { - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('nelmio_api_doc');