Code Duplication    Length = 10-10 lines in 2 locations

src/eXpansion/Bundle/LocalMapRatings/Plugin/Gui/MapRatingsWidget.php 1 location

@@ 74-83 (lines=10) @@
71
        $ratings = $this->ratings;
72
        $yes = 0;
73
        $no = 0;
74
        foreach ($ratings as $login => $rating) {
75
            $score = $rating->getScore();
76
77
            if ($score === 1) {
78
                $yes++;
79
            }
80
            if ($score === -1) {
81
                $no++;
82
            }
83
        }
84
85
        $this->lblRatingsYes->setText('$0d0 $fff'.$yes);
86
        $this->lblRatingsNo->setText('$d00 $fff'.$no);

src/eXpansion/Bundle/WidgetCurrentMap/Plugins/Gui/CurrentMapWidgetFactory.php 1 location

@@ 253-262 (lines=10) @@
250
    {
251
        $yes = 0;
252
        $no = 0;
253
        foreach ($ratings as $login => $rating) {
254
            $score = $rating->getScore();
255
256
            if ($score === 1) {
257
                $yes++;
258
            }
259
            if ($score === -1) {
260
                $no++;
261
            }
262
        }
263
264
        $this->lblYes->setText($yes.' $cbb/ '.count($ratings));
265
        $this->lblNo->setText($no.' $cbb/ '.count($ratings));