Code Duplication    Length = 9-11 lines in 2 locations

code/NewsArticle.php 1 location

@@ 91-99 (lines=9) @@
88
    class NewsArticle_Controller extends Page_Controller
89
    {
90
        
91
        public function init()
92
        {
93
            if (Director::fileExists(project() . "/css/news.css")) {
94
                Requirements::css(project() . "/css/news.css");
95
            } else {
96
                Requirements::css("basic-news/css/news.css");
97
            }
98
            parent::init();
99
        }
100
       
101
       // Provides a resized image with the max width provided
102
       public function ArticleImageSized($maxwidth = 250)

code/NewsHolder.php 1 location

@@ 62-72 (lines=11) @@
59
        "rss"
60
    );
61
62
    public function init()
63
    {
64
        RSSFeed::linkToFeed($this->Link() . "rss");
65
        if (Director::fileExists(project() . "/css/news.css")) {
66
            Requirements::css(project() . "/css/news.css");
67
        } else {
68
            Requirements::css("basic-news/css/news.css");
69
        }
70
71
        parent::init();
72
    }
73
    
74
    public function rss()
75
    {