Code Duplication    Length = 8-8 lines in 2 locations

class/article.php 1 location

@@ 139-146 (lines=8) @@
136
         * @param  int $decimals decimal length
137
         * @return numeric
138
         */
139
        public function getRatingAverage($decimals = 1)
140
        {
141
            $ave = 3;
142
            if ($this->getVar('art_rates')) {
143
                $ave = number_format($this->getVar('art_rating') / $this->getVar('art_rates'), $decimals);
144
            }
145
146
            return $ave;
147
        }
148
149
        /**

class/blog.php 1 location

@@ 132-139 (lines=8) @@
129
         * @param  int $decimals decimal length
130
         * @return numeric
131
         */
132
        public function getRatingAverage($decimals = 1)
133
        {
134
            $ave = 3;
135
            if ($this->getVar('blog_rates')) {
136
                $ave = number_format($this->getVar('blog_rating') / $this->getVar('blog_rates'), $decimals);
137
            }
138
139
            return $ave;
140
        }
141
142
        /**