mirror of
https://github.com/retailcrm/NelmioApiDocBundle.git
synced 2025-02-02 15:51:48 +03:00
Remove incorrect usage of hasOption
`hasOption` is confusingly named, it actually checks that the option has been created, not if the user has passed the option. So in this case its always true. Also changed a weird usage of `in_array`.
This commit is contained in:
parent
5d9c47bbad
commit
9b734b22bd
@ -47,7 +47,7 @@ class DumpCommand extends ContainerAwareCommand
|
||||
|
||||
$routeCollection = $this->getContainer()->get('router')->getRouteCollection();
|
||||
|
||||
if (!$input->hasOption('format') || in_array($format, array('json'))) {
|
||||
if ($format == 'json') {
|
||||
$formatter = $this->getContainer()->get('nelmio_api_doc.formatter.simple_formatter');
|
||||
} else {
|
||||
if (!in_array($format, $this->availableFormats)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user