Merge pull request #14 from retailcrm/deprecates

sf 6 deprecation types
This commit is contained in:
Ilyas Salikhov 2024-06-18 20:02:23 +03:00 committed by GitHub
commit ed2e185fe2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -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'); $format = $input->getOption('format');
$view = $input->getOption('view'); $view = $input->getOption('view');

View File

@ -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'); $extractor = $this->container->get('nelmio_api_doc.extractor.api_doc_extractor');
$this->formatter = $this->container->get('nelmio_api_doc.formatter.swagger_formatter'); $this->formatter = $this->container->get('nelmio_api_doc.formatter.swagger_formatter');
@ -77,7 +77,7 @@ class SwaggerDumpCommand extends Command
$data = $this->getResourceList($apiDocs, $output); $data = $this->getResourceList($apiDocs, $output);
$this->dump($data, null, $input, $output); $this->dump($data, null, $input, $output);
return; return 0;
} }
if (false != ($resource = $input->getOption('resource'))) { if (false != ($resource = $input->getOption('resource'))) {
@ -87,7 +87,7 @@ class SwaggerDumpCommand extends Command
} }
$this->dump($data, $resource, $input, $output); $this->dump($data, $resource, $input, $output);
return; return 0;
} }
/* /*
@ -112,6 +112,8 @@ class SwaggerDumpCommand extends Command
$data = $this->getApiDeclaration($apiDocs, $resource, $output); $data = $this->getApiDeclaration($apiDocs, $resource, $output);
$this->dump($data, $resource, $input, $output, false); $this->dump($data, $resource, $input, $output, false);
} }
return 0;
} }
protected function dump(array $data, $resource, InputInterface $input, OutputInterface $output, $treatAsFile = true) protected function dump(array $data, $resource, InputInterface $input, OutputInterface $output, $treatAsFile = true)

View File

@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface class Configuration implements ConfigurationInterface
{ {
public function getConfigTreeBuilder() public function getConfigTreeBuilder(): TreeBuilder
{ {
$treeBuilder = new TreeBuilder('nelmio_api_doc'); $treeBuilder = new TreeBuilder('nelmio_api_doc');