Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Insight] exit() and die() functions should be avoided - in Bundle/…/Command/UpdateToI18nCommand.php, line 31 #9

Closed
FloSeas opened this issue Dec 2, 2014 · 0 comments

Comments

@FloSeas
Copy link
Contributor

FloSeas commented Dec 2, 2014

in Bundle/I18nBundle/Command/UpdateToI18nCommand.php, line 31

This line stops the execution flow, without explanation. If this is for debug, you should remove it. If this is to deal with an error, use exceptions instead.

    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $defaultLocale = $input->getArgument('default-locale');
        $defaultLocale = $defaultLocale ? $defaultLocale : 'fr';
        $this->doUpdate($output, $defaultLocale);
        exit;
    }

    protected function doUpdate(OutputInterface $output, $locale) 
    {
        $container = $this->getApplication()->getKernel()->getContainer();

Posted from SensioLabsInsight

@FloSeas FloSeas closed this as completed Dec 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant