Code Duplication    Length = 8-8 lines in 2 locations

class/article.php 1 location

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

class/blog.php 1 location

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