Code Duplication    Length = 8-9 lines in 2 locations

src/Kunstmaan/AdminListBundle/Twig/AdminListTwigExtension.php 1 location

@@ 21-28 (lines=8) @@
18
     *
19
     * @return array An array of functions
20
     */
21
    public function getFunctions()
22
    {
23
        return [
24
            new Twig_SimpleFunction('adminlist_widget', [$this, 'renderWidget'], ['needs_environment' => true, 'is_safe' => ['html']]),
25
            new Twig_SimpleFunction('adminthumb_widget', [$this, 'renderThumbWidget'], ['needs_environment' => true, 'is_safe' => ['html']]),
26
            new Twig_SimpleFunction('supported_export_extensions', [$this, 'getSupportedExtensions']),
27
        ];
28
    }
29
30
    /**
31
     * {@inheritdoc}

src/Kunstmaan/AdminBundle/Twig/MultiDomainAdminTwigExtension.php 1 location

@@ 27-35 (lines=9) @@
24
     *
25
     * @return array
26
     */
27
    public function getFunctions()
28
    {
29
        return [
30
            new Twig_SimpleFunction('multidomain_widget', [$this, 'renderWidget'], ['needs_environment' => true, 'is_safe' => ['html']]),
31
            new Twig_SimpleFunction('is_multidomain_site', [$this, 'isMultiDomainSite']),
32
            new Twig_SimpleFunction('get_switched_host', [$this, 'getSwitchedHost']),
33
            new Twig_SimpleFunction('switched_host_is_current', [$this, 'switchedHostIsCurrent']),
34
        ];
35
    }
36
37
    /**
38
     * Render multidomain switcher widget.