Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | protected function configure() |
||
19 | { |
||
20 | parent::configure(); |
||
21 | |||
22 | $this |
||
23 | ->setName('doctrine:query:sql') |
||
24 | ->setHelp(<<<EOT |
||
25 | The <info>%command.name%</info> command executes the given SQL query and |
||
26 | outputs the results: |
||
27 | |||
28 | <info>php %command.full_name% "SELECT * FROM users"</info> |
||
29 | EOT |
||
30 | ); |
||
31 | |||
32 | if ($this->getDefinition()->hasOption('connection')) { |
||
33 | return; |
||
34 | } |
||
35 | |||
36 | $this->addOption('connection', null, InputOption::VALUE_OPTIONAL, 'The connection to use for this command'); |
||
37 | } |
||
38 | |||
49 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: