Code Duplication    Length = 8-13 lines in 2 locations

src/Eccube/Twig/Extension/EccubeExtension.php 2 locations

@@ 56-63 (lines=8) @@
53
            new TwigFunction('calc_inc_tax', [$this, 'getCalcIncTax']),
54
            new TwigFunction('active_menus', [$this, 'getActiveMenus']),
55
            new TwigFunction('class_categories_as_json', [$this, 'getClassCategoriesAsJson']),
56
            new TwigFunction('php_*', function () {
57
                $arg_list = func_get_args();
58
                $function = array_shift($arg_list);
59
                if (is_callable($function)) {
60
                    return call_user_func_array($function, $arg_list);
61
                }
62
                trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING);
63
            }, ['pre_escape' => 'html', 'is_safe' => ['html']]),
64
        ];
65
    }
66
@@ 243-255 (lines=13) @@
240
     *
241
     * @return mixed|null
242
     */
243
    public function getPhpFunctions()
244
    {
245
        $arg_list = func_get_args();
246
        $function = array_shift($arg_list);
247
248
        if (is_callable($function)) {
249
            return call_user_func_array($function, $arg_list);
250
        }
251
252
        trigger_error('Called to an undefined function : php_'.$function, E_USER_WARNING);
253
254
        return null;
255
    }
256
257
    /**
258
     * Get the ClassCategories as JSON.