Code Duplication    Length = 3-3 lines in 2 locations

src/lib/Zikula/Bundle/HookBundle/Controller/HookController.php 2 locations

@@ 277-279 (lines=3) @@
274
        if (empty($subscriber)) {
275
            throw new \InvalidArgumentException($this->__f('Module "%s" is not a valid subscriber.', ['%s' => $subscriber->getOwner()]));
276
        }
277
        if (!$this->get('kernel')->isBundle($subscriber->getOwner())) {
278
            throw new \RuntimeException($this->__f('Subscriber module "%s" is not available.', ['%s' => $subscriber->getOwner()]));
279
        }
280
        if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber->getOwner() . '::', '::', ACCESS_ADMIN)) {
281
            throw new AccessDeniedException();
282
        }
@@ 358-360 (lines=3) @@
355
        if (empty($subscriber)) {
356
            throw new \InvalidArgumentException($this->__f('Module "%s" is not a valid subscriber.', ['%s' => $subscriber->getOwner()]));
357
        }
358
        if (!$this->get('kernel')->isBundle($subscriber->getOwner())) {
359
            throw new \RuntimeException($this->__f('Subscriber module "%s" is not available.', ['%s' => $subscriber->getOwner()]));
360
        }
361
        if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($subscriber->getOwner() . '::', '::', ACCESS_ADMIN)) {
362
            throw new AccessDeniedException();
363
        }