src/eXpansion/Bundle/LocalMapRatings/Plugin/Gui/MapRatingsWidget.php 1 location
|
@@ 75-84 (lines=10) @@
|
| 72 |
|
$ratings = $this->ratings; |
| 73 |
|
$yes = 0; |
| 74 |
|
$no = 0; |
| 75 |
|
foreach ($ratings as $login => $rating) { |
| 76 |
|
$score = $rating->getScore(); |
| 77 |
|
|
| 78 |
|
if ($score === 1) { |
| 79 |
|
$yes++; |
| 80 |
|
} |
| 81 |
|
if ($score === -1) { |
| 82 |
|
$no++; |
| 83 |
|
} |
| 84 |
|
} |
| 85 |
|
|
| 86 |
|
$this->lblRatingsYes->setText('$0d0 $fff' . $yes); |
| 87 |
|
$this->lblRatingsNo->setText('$d00 $fff' . $no); |
src/eXpansion/Bundle/WidgetCurrentMap/Plugins/Gui/CurrentMapWidgetFactory.php 1 location
|
@@ 255-264 (lines=10) @@
|
| 252 |
|
{ |
| 253 |
|
$yes = 0; |
| 254 |
|
$no = 0; |
| 255 |
|
foreach ($ratings as $login => $rating) { |
| 256 |
|
$score = $rating->getScore(); |
| 257 |
|
|
| 258 |
|
if ($score === 1) { |
| 259 |
|
$yes++; |
| 260 |
|
} |
| 261 |
|
if ($score === -1) { |
| 262 |
|
$no++; |
| 263 |
|
} |
| 264 |
|
} |
| 265 |
|
|
| 266 |
|
$this->lblYes->setText($yes.' $cbb/ '.count($ratings)); |
| 267 |
|
$this->lblNo->setText($no.' $cbb/ '.count($ratings)); |