From 727ac232d5eef15cc1d02f32ee77e60234ff20fa Mon Sep 17 00:00:00 2001 From: Liviu-Mihail Concioiu Date: Thu, 31 Oct 2024 11:36:15 +0100 Subject: [PATCH] Replaces $1 from generated readme with actual clients (#7663) * Replaces $1 from readme with actual clients * Improve code --- Parser/Client/AbstractClientParser.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Parser/Client/AbstractClientParser.php b/Parser/Client/AbstractClientParser.php index 90c10a05a7..984c6c7a1d 100644 --- a/Parser/Client/AbstractClientParser.php +++ b/Parser/Client/AbstractClientParser.php @@ -78,13 +78,27 @@ public static function getAvailableClients(): array $names = []; foreach ($regexes as $regex) { - if ('$1' === $regex['name']) { + if (false !== \strpos($regex['name'], '$1')) { continue; } $names[] = $regex['name']; } + if (static::class === MobileApp::class) { + $names = \array_merge($names, [ + // Microsoft Office $1 + 'Microsoft Office Access', 'Microsoft Office Excel', 'Microsoft Office OneDrive for Business', + 'Microsoft Office OneNote', 'Microsoft Office PowerPoint', 'Microsoft Office Project', + 'Microsoft Office Publisher', 'Microsoft Office Visio', 'Microsoft Office Word', + // Podkicker$1 + 'Podkicker', 'Podkicker Pro', 'Podkicker Classic', + // radio.$1 + 'radio.at', 'radio.de', 'radio.dk', 'radio.es', 'radio.fr', + 'radio.it', 'radio.pl', 'radio.pt', 'radio.se', 'radio.net', + ]); + } + \natcasesort($names); return \array_unique($names);