Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 280-282 (lines=3) @@
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
        }
283
284
        // get providerarea from POST
285
        $providerArea = $request->request->get('providerarea', '');
@@ 298-300 (lines=3) @@
295
        if (!$this->get('kernel')->isBundle($provider->getOwner())) {
296
            throw new \RuntimeException($this->__f('Provider module "%s" is not available.', ['%s' => $provider->getOwner()]));
297
        }
298
        if (!$this->get('zikula_permissions_module.api.permission')->hasPermission($provider->getOwner() . '::', '::', ACCESS_ADMIN)) {
299
            throw new AccessDeniedException();
300
        }
301
302
        // check if binding between areas exists
303
        $binding = $this->get('hook_dispatcher')->getBindingBetweenAreas($subscriberArea, $providerArea);
@@ 361-363 (lines=3) @@
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
        }
364
365
        // get providers' areas from POST
366
        $providerarea = $request->request->get('providerarea', '');