From 17190feb2f3479b6f7d717d21eda1d64547ee538 Mon Sep 17 00:00:00 2001 From: tillcash Date: Wed, 7 Feb 2024 22:50:43 +0530 Subject: [PATCH 1/3] [KilledbyMicrosoftBridge] New Bridge --- bridges/KilledbyMicrosoftBridge.php | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 bridges/KilledbyMicrosoftBridge.php diff --git a/bridges/KilledbyMicrosoftBridge.php b/bridges/KilledbyMicrosoftBridge.php new file mode 100644 index 00000000000..85a63f22a5b --- /dev/null +++ b/bridges/KilledbyMicrosoftBridge.php @@ -0,0 +1,39 @@ +items[] = array( + 'title' => $title, + 'uid' => $service['slug'], + 'uri' => $service['link'], + 'content' => $service['description'] + ); + } + } +} From 6c01cd15f6e8d32adaf89862edbdfe4570018964 Mon Sep 17 00:00:00 2001 From: tillcash Date: Wed, 7 Feb 2024 22:55:38 +0530 Subject: [PATCH 2/3] Update KilledbyMicrosoftBridge.php fix lint --- bridges/KilledbyMicrosoftBridge.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bridges/KilledbyMicrosoftBridge.php b/bridges/KilledbyMicrosoftBridge.php index 85a63f22a5b..e195117d365 100644 --- a/bridges/KilledbyMicrosoftBridge.php +++ b/bridges/KilledbyMicrosoftBridge.php @@ -16,7 +16,7 @@ public function collectData() $discontinuedServices = json_decode($json, true); // Sort the array based on dateClose in descending order - usort($discontinuedServices, function($a, $b) { + usort($discontinuedServices, function ($a, $b) { return strtotime($b['dateClose']) - strtotime($a['dateClose']); }); From 05cd7b15c1f69e94add0be1db30eb9cc396428b0 Mon Sep 17 00:00:00 2001 From: tillcash Date: Wed, 7 Feb 2024 22:58:05 +0530 Subject: [PATCH 3/3] Update KilledbyMicrosoftBridge.php fix lint --- bridges/KilledbyMicrosoftBridge.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bridges/KilledbyMicrosoftBridge.php b/bridges/KilledbyMicrosoftBridge.php index e195117d365..7cde913298b 100644 --- a/bridges/KilledbyMicrosoftBridge.php +++ b/bridges/KilledbyMicrosoftBridge.php @@ -16,7 +16,7 @@ public function collectData() $discontinuedServices = json_decode($json, true); // Sort the array based on dateClose in descending order - usort($discontinuedServices, function ($a, $b) { + usort($discontinuedServices, function($a, $b) { return strtotime($b['dateClose']) - strtotime($a['dateClose']); }); @@ -28,12 +28,12 @@ public function collectData() // Concatenate service name with dateOpen and dateClose $title = "{$service['name']} ({$service['dateOpen']} - {$service['dateClose']})"; - $this->items[] = array( + $this->items[] = [ 'title' => $title, 'uid' => $service['slug'], 'uri' => $service['link'], 'content' => $service['description'] - ); + ]; } } }