|
@@ 433-443 (lines=11) @@
|
| 430 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 431 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 432 |
|
$arrayGames = array(); |
| 433 |
|
foreach ($games as $game) { |
| 434 |
|
if ($game->getPublicationDate()) { |
| 435 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 436 |
|
} elseif ($game->getStartDate()) { |
| 437 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 438 |
|
} else { |
| 439 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 440 |
|
} |
| 441 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 442 |
|
$arrayGames[$key] = $game; |
| 443 |
|
} |
| 444 |
|
|
| 445 |
|
return $arrayGames; |
| 446 |
|
} |
|
@@ 503-513 (lines=11) @@
|
| 500 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 501 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 502 |
|
$arrayGames = array(); |
| 503 |
|
foreach ($games as $game) { |
| 504 |
|
if ($game->getPublicationDate()) { |
| 505 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 506 |
|
} elseif ($game->getStartDate()) { |
| 507 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 508 |
|
} else { |
| 509 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 510 |
|
} |
| 511 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 512 |
|
$arrayGames[$key] = $game; |
| 513 |
|
} |
| 514 |
|
|
| 515 |
|
return $arrayGames; |
| 516 |
|
} |
|
@@ 686-696 (lines=11) @@
|
| 683 |
|
// je les classe par date de publication (date comme clé dans le tableau afin de pouvoir merger les objets |
| 684 |
|
// de type article avec le même procédé en les classant naturellement par date asc ou desc |
| 685 |
|
$arrayGames = array(); |
| 686 |
|
foreach ($games as $game) { |
| 687 |
|
if ($game->getPublicationDate()) { |
| 688 |
|
$key = $game->getPublicationDate()->format('Ymd'); |
| 689 |
|
} elseif ($game->getStartDate()) { |
| 690 |
|
$key = $game->getStartDate()->format('Ymd'); |
| 691 |
|
} else { |
| 692 |
|
$key = $game->getUpdatedAt()->format('Ymd'); |
| 693 |
|
} |
| 694 |
|
$key .= $game->getUpdatedAt()->format('Ymd') . '-' . $game->getId(); |
| 695 |
|
$arrayGames[$key] = $game; |
| 696 |
|
} |
| 697 |
|
|
| 698 |
|
return $arrayGames; |
| 699 |
|
} |