Code Duplication    Length = 8-8 lines in 4 locations

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

@@ 358-365 (lines=8) @@
355
     * @param string $name
356
     * @param string $value
357
     */
358
    public function pageSetVar($name, $value)
359
    {
360
        if (empty($name) || empty($value)) {
361
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
362
        }
363
364
        $this->container->get('zikula_core.common.theme.pagevars')->set($name, $value);
365
    }
366
367
    /**
368
     * Zikula allows only the following asset types
@@ 410-417 (lines=8) @@
407
     * @param null $default
408
     * @return mixed
409
     */
410
    public function pageGetVar($name, $default = null)
411
    {
412
        if (empty($name)) {
413
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
414
        }
415
416
        return $this->container->get('zikula_core.common.theme.pagevars')->get($name, $default);
417
    }
418
419
    /**
420
     * @param $module
@@ 425-432 (lines=8) @@
422
     * @param null $default
423
     * @return mixed
424
     */
425
    public function getModVar($module, $name, $default = null)
426
    {
427
        if (empty($module) || empty($name)) {
428
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
429
        }
430
431
        return $this->container->get('zikula_extensions_module.api.variable')->get($module, $name, $default);
432
    }
433
434
    /**
435
     * @param $name
@@ 439-446 (lines=8) @@
436
     * @param null $default
437
     * @return mixed
438
     */
439
    public function getSystemVar($name, $default = null)
440
    {
441
        if (empty($name)) {
442
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
443
        }
444
445
        return $this->container->get('zikula_extensions_module.api.variable')->getSystemVar($name, $default);
446
    }
447
448
    /**
449
     * @param string $name