Code Duplication    Length = 16-18 lines in 2 locations

code/blocks/RecentVideosBlock.php 1 location

@@ 51-66 (lines=16) @@
48
    /**
49
     * @return FieldList
50
     */
51
    public function getCMSFields()
52
    {
53
        $fields = singleton('Block')->getCMSFields();
54
55
        $fields->addFieldsToTab('Root.Main', array(
56
            NumericField::create('Limit'),
57
        ));
58
59
        $fields->addFieldToTab(
60
            'Root.Main',
61
            DropdownField::create('VideoPageID', 'Featured Video Page', YouTubeIntegrationVideosPage::get()->map())
62
                ->setEmptyString('')
63
        );
64
65
        return $fields;
66
    }
67
68
    /**
69
     * @param null $member

code/blocks/RecentBlogPostsBlock.php 1 location

@@ 44-61 (lines=18) @@
41
        /**
42
         * @return FieldList
43
         */
44
        public function getCMSFields()
45
        {
46
            $fields = singleton('Block')->getCMSFields();
47
48
            $fields->addFieldsToTab('Root.Main', array(
49
                NumericField::create('Limit'),
50
            ));
51
52
            if (class_exists('Blog')) {
53
                $fields->addFieldToTab(
54
                    'Root.Main',
55
                    DropdownField::create('BlogID', 'Featured Blog', Blog::get()->map())
56
                        ->setEmptyString('')
57
                );
58
            }
59
60
            return $fields;
61
        }
62
    }
63
64
}