Code Duplication    Length = 9-9 lines in 2 locations

src/LIN3S/CMSKernel/Infrastructure/Lin3sAdminBundle/Action/Type/NewTranslatableActionType.php 1 location

@@ 134-142 (lines=9) @@
131
        );
132
    }
133
134
    private function addError(Exception $exception, array $options)
135
    {
136
        $exceptions = $this->catchableExceptions($options);
137
        $exceptionClassName = get_class($exception);
138
139
        if (array_key_exists($exceptionClassName, $exceptions)) {
140
            $this->flashBag->add('lin3s_admin_error', $exceptions[$exceptionClassName]);
141
        }
142
    }
143
144
    private function catchableExceptions(array $options)
145
    {

src/LIN3S/CMSKernel/Infrastructure/Lin3sAdminBundle/Action/Type/TranslateActionType.php 1 location

@@ 139-147 (lines=9) @@
136
        return $translation;
137
    }
138
139
    private function addError(Exception $exception, array $options)
140
    {
141
        $exceptions = $this->catchableExceptions($options);
142
        $exceptionClassName = get_class($exception);
143
144
        if (array_key_exists($exceptionClassName, $exceptions)) {
145
            $this->flashBag->add('lin3s_admin_error', $exceptions[$exceptionClassName]);
146
        }
147
    }
148
149
    private function catchableExceptions(array $options)
150
    {