Code Duplication    Length = 8-9 lines in 2 locations

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

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

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

@@ 27-34 (lines=8) @@
24
     *
25
     * @return array An array of functions
26
     */
27
    public function getFunctions()
28
    {
29
        return [
30
            new TwigFunction('adminlist_widget', [$this, 'renderWidget'], ['needs_environment' => true, 'is_safe' => ['html']]),
31
            new TwigFunction('adminthumb_widget', [$this, 'renderThumbWidget'], ['needs_environment' => true, 'is_safe' => ['html']]),
32
            new TwigFunction('supported_export_extensions', [$this, 'getSupportedExtensions']),
33
        ];
34
    }
35
36
    /**
37
     * {@inheritdoc}