src/Xtools/Page.php 1 location
|
@@ 189-196 (lines=8) @@
|
| 186 |
|
$totalAdded = 0; |
| 187 |
|
$totalRemoved = 0; |
| 188 |
|
$revisions = []; |
| 189 |
|
foreach ($data as $revision) { |
| 190 |
|
if ($revision['length_change'] > 0) { |
| 191 |
|
$totalAdded += $revision['length_change']; |
| 192 |
|
} else { |
| 193 |
|
$totalRemoved += $revision['length_change']; |
| 194 |
|
} |
| 195 |
|
$revisions[] = $revision; |
| 196 |
|
} |
| 197 |
|
$this->revisions = $revisions; |
| 198 |
|
|
| 199 |
|
return $revisions; |
src/AppBundle/Controller/TopEditsController.php 1 location
|
@@ 248-255 (lines=8) @@
|
| 245 |
|
$totalAdded = 0; |
| 246 |
|
$totalRemoved = 0; |
| 247 |
|
$revisions = []; |
| 248 |
|
foreach ($revisionsData as $revision) { |
| 249 |
|
if ($revision['length_change'] > 0) { |
| 250 |
|
$totalAdded += $revision['length_change']; |
| 251 |
|
} else { |
| 252 |
|
$totalRemoved += $revision['length_change']; |
| 253 |
|
} |
| 254 |
|
$revisions[] = new Edit($page, $revision); |
| 255 |
|
} |
| 256 |
|
|
| 257 |
|
// Send all to the template. |
| 258 |
|
return $this->render('topedits/result_article.html.twig', [ |