| @@ 429-449 (lines=21) @@ | ||
| 426 | /** |
|
| 427 | * @return QuestionHelper|DialogHelper |
|
| 428 | */ |
|
| 429 | private function getQuestionHelper() |
|
| 430 | { |
|
| 431 | // NEXT_MAJOR: Remove this BC code for SensioGeneratorBundle 2.3/2.4 after dropping support for Symfony 2.3 |
|
| 432 | if (class_exists('Sensio\Bundle\GeneratorBundle\Command\Helper\DialogHelper')) { |
|
| 433 | $questionHelper = $this->getHelper('dialog'); |
|
| 434 | ||
| 435 | if (!$questionHelper instanceof DialogHelper) { |
|
| 436 | $questionHelper = new DialogHelper(); |
|
| 437 | $this->getHelperSet()->set($questionHelper); |
|
| 438 | } |
|
| 439 | } else { |
|
| 440 | $questionHelper = $this->getHelper('question'); |
|
| 441 | ||
| 442 | if (!$questionHelper instanceof QuestionHelper) { |
|
| 443 | $questionHelper = new QuestionHelper(); |
|
| 444 | $this->getHelperSet()->set($questionHelper); |
|
| 445 | } |
|
| 446 | } |
|
| 447 | ||
| 448 | return $questionHelper; |
|
| 449 | } |
|
| 450 | } |
|
| 451 | ||
| @@ 97-117 (lines=21) @@ | ||
| 94 | /** |
|
| 95 | * @return QuestionHelper|DialogHelper |
|
| 96 | */ |
|
| 97 | private function getQuestionHelper() |
|
| 98 | { |
|
| 99 | // NEXT_MAJOR: Remove this BC code for SensioGeneratorBundle 2.3/2.4 after dropping support for Symfony 2.3 |
|
| 100 | if (class_exists('Sensio\Bundle\GeneratorBundle\Command\Helper\DialogHelper')) { |
|
| 101 | $questionHelper = $this->getHelper('dialog'); |
|
| 102 | ||
| 103 | if (!$questionHelper instanceof DialogHelper) { |
|
| 104 | $questionHelper = new DialogHelper(); |
|
| 105 | $this->getHelperSet()->set($questionHelper); |
|
| 106 | } |
|
| 107 | } else { |
|
| 108 | $questionHelper = $this->getHelper('question'); |
|
| 109 | ||
| 110 | if (!$questionHelper instanceof QuestionHelper) { |
|
| 111 | $questionHelper = new QuestionHelper(); |
|
| 112 | $this->getHelperSet()->set($questionHelper); |
|
| 113 | } |
|
| 114 | } |
|
| 115 | ||
| 116 | return $questionHelper; |
|
| 117 | } |
|
| 118 | } |
|
| 119 | ||