Code Duplication    Length = 3-3 lines in 2 locations

src/system/ExtensionsModule/Helper/ExtensionHelper.php 2 locations

@@ 104-106 (lines=3) @@
101
                throw new \RuntimeException($this->translator->__f('Error! Not allowed to upgrade %s.', ['%s' => $extension->getDisplayname()]));
102
                break;
103
            default:
104
                if ($extension->getState() > 10) {
105
                    throw new \RuntimeException($this->translator->__f('Error! %s is not compatible with this version of Zikula.', ['%s' => $extension->getDisplayname()]));
106
                }
107
        }
108
109
        $bundle = $this->container->get('kernel')->getModule($extension->getName());
@@ 157-159 (lines=3) @@
154
            || (ZikulaKernel::isCoreModule($extension->getName()))) {
155
            throw new \RuntimeException($this->translator->__f('Error! No permission to uninstall %s.', ['%s' => $extension->getDisplayname()]));
156
        }
157
        if ($extension->getState() == Constant::STATE_UNINITIALISED) {
158
            throw new \RuntimeException($this->translator->__f('Error! %s is not yet installed, therefore it cannot be uninstalled.', ['%s' => $extension->getDisplayname()]));
159
        }
160
161
        // allow event to prevent extension removal
162
        $vetoEvent = new GenericEvent($extension);