|
@@ 406-416 (lines=11) @@
|
| 403 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 404 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 405 |
|
$arrayGames = array(); |
| 406 |
|
foreach ($games as $game) { |
| 407 |
|
if ($game->getPublicationDate()) { |
| 408 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 409 |
|
} elseif ($game->getStartDate()) { |
| 410 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 411 |
|
} else { |
| 412 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 413 |
|
} |
| 414 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 415 |
|
$arrayGames[$key] = $game; |
| 416 |
|
} |
| 417 |
|
|
| 418 |
|
return $arrayGames; |
| 419 |
|
} |
|
@@ 578-588 (lines=11) @@
|
| 575 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 576 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 577 |
|
$arrayGames = array(); |
| 578 |
|
foreach ($games as $game) { |
| 579 |
|
if ($game->getPublicationDate()) { |
| 580 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 581 |
|
} elseif ($game->getStartDate()) { |
| 582 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 583 |
|
} else { |
| 584 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 585 |
|
} |
| 586 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 587 |
|
$arrayGames[$key] = $game; |
| 588 |
|
} |
| 589 |
|
|
| 590 |
|
return $arrayGames; |
| 591 |
|
} |