Code Duplication    Length = 8-8 lines in 4 locations

src/system/ExtensionsModule/Twig/Extension/ModVarExtension.php 2 locations

@@ 61-68 (lines=8) @@
58
     * @param null $default
59
     * @return mixed
60
     */
61
    public function getModVar($module, $name, $default = null)
62
    {
63
        if (empty($module) || empty($name)) {
64
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
65
        }
66
67
        return $this->variableApi->get($module, $name, $default);
68
    }
69
70
    /**
71
     * @param $name
@@ 75-82 (lines=8) @@
72
     * @param null $default
73
     * @return mixed
74
     */
75
    public function getSystemVar($name, $default = null)
76
    {
77
        if (empty($name)) {
78
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
79
        }
80
81
        return $this->variableApi->getSystemVar($name, $default);
82
    }
83
}
84

src/system/ThemeModule/Twig/Extension/PageVarExtension.php 2 locations

@@ 98-105 (lines=8) @@
95
     * @param string $name
96
     * @param string $value
97
     */
98
    public function pageSetVar($name, $value)
99
    {
100
        if (empty($name) || empty($value)) {
101
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
102
        }
103
104
        $this->pageVars->set($name, $value);
105
    }
106
107
    /**
108
     * @param $name
@@ 112-119 (lines=8) @@
109
     * @param null $default
110
     * @return mixed
111
     */
112
    public function pageGetVar($name, $default = null)
113
    {
114
        if (empty($name)) {
115
            throw new \InvalidArgumentException($this->translator->__('Empty argument at') . ':' . __FILE__ . '::' . __LINE__);
116
        }
117
118
        return $this->pageVars->get($name, $default);
119
    }
120
}
121