|
@@ 441-451 (lines=11) @@
|
| 438 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 439 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 440 |
|
$arrayGames = array(); |
| 441 |
|
foreach ($games as $game) { |
| 442 |
|
if ($game->getPublicationDate()) { |
| 443 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 444 |
|
} elseif ($game->getStartDate()) { |
| 445 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 446 |
|
} else { |
| 447 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 448 |
|
} |
| 449 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 450 |
|
$arrayGames[$key] = $game; |
| 451 |
|
} |
| 452 |
|
|
| 453 |
|
return $arrayGames; |
| 454 |
|
} |
|
@@ 511-521 (lines=11) @@
|
| 508 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 509 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 510 |
|
$arrayGames = array(); |
| 511 |
|
foreach ($games as $game) { |
| 512 |
|
if ($game->getPublicationDate()) { |
| 513 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 514 |
|
} elseif ($game->getStartDate()) { |
| 515 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 516 |
|
} else { |
| 517 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 518 |
|
} |
| 519 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 520 |
|
$arrayGames[$key] = $game; |
| 521 |
|
} |
| 522 |
|
|
| 523 |
|
return $arrayGames; |
| 524 |
|
} |
|
@@ 766-776 (lines=11) @@
|
| 763 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 764 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 765 |
|
$arrayGames = array(); |
| 766 |
|
foreach ($games as $game) { |
| 767 |
|
if ($game->getPublicationDate()) { |
| 768 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 769 |
|
} elseif ($game->getStartDate()) { |
| 770 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 771 |
|
} else { |
| 772 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 773 |
|
} |
| 774 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 775 |
|
$arrayGames[$key] = $game; |
| 776 |
|
} |
| 777 |
|
|
| 778 |
|
return $arrayGames; |
| 779 |
|
} |