Code Duplication    Length = 8-8 lines in 2 locations

src/lib/Zikula/Core/AbstractExtensionInstaller.php 1 location

@@ 118-125 (lines=8) @@
115
     * @param $type
116
     * @param $message
117
     */
118
    public function addFlash($type, $message)
119
    {
120
        if (!$this->container->has('session')) {
121
            throw new \LogicException('You can not use the addFlash method if sessions are disabled.');
122
        }
123
124
        $this->container->get('session')->getFlashBag()->add($type, $message);
125
    }
126
}
127
128
/**

src/system/BlocksModule/AbstractBlockHandler.php 1 location

@@ 121-128 (lines=8) @@
118
     * @param string $message The message
119
     * @throws \LogicException
120
     */
121
    protected function addFlash($type, $message)
122
    {
123
        if (!$this->container->has('session')) {
124
            throw new \LogicException('You can not use the addFlash method if sessions are disabled.');
125
        }
126
127
        $this->container->get('session')->getFlashBag()->add($type, $message);
128
    }
129
130
    /**
131
     * Returns a rendered view.