Code Duplication    Length = 8-8 lines in 4 locations

src/lib/Zikula/Bundle/CoreBundle/Twig/Extension/CoreExtension.php 4 locations

@@ 244-251 (lines=8) @@
241
     * @param string $name
242
     * @param string $value
243
     */
244
    public function pageSetVar($name, $value)
245
    {
246
        if (empty($name) || empty($value)) {
247
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
248
        }
249
250
        $this->container->get('zikula_core.common.theme.pagevars')->set($name, $value);
251
    }
252
253
    /**
254
     * Zikula allows only the following asset types
@@ 296-303 (lines=8) @@
293
     * @param null $default
294
     * @return mixed
295
     */
296
    public function pageGetVar($name, $default = null)
297
    {
298
        if (empty($name)) {
299
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
300
        }
301
302
        return $this->container->get('zikula_core.common.theme.pagevars')->get($name, $default);
303
    }
304
305
    /**
306
     * @param $module
@@ 311-318 (lines=8) @@
308
     * @param null $default
309
     * @return mixed
310
     */
311
    public function getModVar($module, $name, $default = null)
312
    {
313
        if (empty($module) || empty($name)) {
314
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
315
        }
316
317
        return $this->container->get('zikula_extensions_module.api.variable')->get($module, $name, $default);
318
    }
319
320
    /**
321
     * @param $name
@@ 325-332 (lines=8) @@
322
     * @param null $default
323
     * @return mixed
324
     */
325
    public function getSystemVar($name, $default = null)
326
    {
327
        if (empty($name)) {
328
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
329
        }
330
331
        return $this->container->get('zikula_extensions_module.api.variable')->getSystemVar($name, $default);
332
    }
333
334
    /**
335
     * @param string $name