Code Duplication    Length = 7-15 lines in 2 locations

src/Kunstmaan/NodeSearchBundle/Twig/KunstmaanNodeSearchTwigExtension.php 1 location

@@ 38-44 (lines=7) @@
35
     *
36
     * @return array An array of functions
37
     */
38
    public function getFunctions()
39
    {
40
        return array(
41
            new \Twig_SimpleFunction('get_parent_page', array($this, 'getParentPage')),
42
            new \Twig_SimpleFunction('render_indexable_pageparts', array($this, 'renderIndexablePageParts'), array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('html'))),
43
        );
44
    }
45
46
    /**
47
     * @param HasNodeInterface $page

src/Kunstmaan/SeoBundle/Twig/GoogleAnalyticsTwigExtension.php 1 location

@@ 32-46 (lines=15) @@
29
     *
30
     * @return array An array of functions
31
     */
32
    public function getFunctions()
33
    {
34
        return array(
35
            new \Twig_SimpleFunction(
36
                'google_analytics_initialize',
37
                array($this, 'renderInitialize'),
38
                array('is_safe' => array('html'), 'needs_environment' => true)
39
            ),
40
            new \Twig_SimpleFunction(
41
                'google_analytics_track_order',
42
                array($this, 'renderECommerceTracking'),
43
                array('is_safe' => array('html'), 'needs_environment' => true)
44
            ),
45
        );
46
    }
47
48
49
    /**