| Conditions | 1 |
| Paths | 1 |
| Total Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function configure() |
||
| 21 | { |
||
| 22 | $this->setName('ezplatform:debug:service'); |
||
| 23 | $this->setDescription('Debug / Retrive class name of a service'); |
||
| 24 | $this->addArgument( |
||
| 25 | 'service', |
||
| 26 | InputArgument::REQUIRED, |
||
| 27 | 'The service to return class name for, for instance "ezpublish.cache_pool"' |
||
| 28 | ); |
||
| 29 | $this->addOption( |
||
| 30 | 'oneline', |
||
| 31 | 'o', |
||
| 32 | InputOption::VALUE_NONE, |
||
| 33 | 'Only return value, for automation / testing use on a single line.' |
||
| 34 | ); |
||
| 35 | $this->setHelp(<<<EOM |
||
| 36 | Outputs a given service class name. |
||
| 37 | |||
| 38 | To rather see service definition, use: <comment>debug:container ezpublish.cache_pool</comment> |
||
| 39 | |||
| 40 | EOM |
||
| 41 | ); |
||
| 42 | } |
||
| 43 | |||
| 58 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.