Files
php-flasher/src/Prime/Translation/Messages.php
T
Younes ENNAJI a0873c0082 Simplify PHPDoc comments in Prime interfaces and traits
This commit simplifies PHPDoc comments across 26 files in the src/Prime/
directory by removing verbose documentation and keeping only essential type
annotations.

Changes include:
- Removed "Design pattern" mentions and redundant explanations
- Kept all @param and @return type annotations for PHPStan
- Maintained @phpstan-* annotations for type safety

Files modified:
- Exception classes (4 files)
- Http interfaces (5 files)
- Notification builders and interfaces (3 files)
- Plugin, Response, Storage, Template, Translation, and Test interfaces (14 files)

All changes pass PHPStan analysis and tests.
2026-01-15 23:40:19 +01:00

36 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Flasher\Prime\Translation;
use Flasher\Prime\Translation\Language\Arabic;
use Flasher\Prime\Translation\Language\Chinese;
use Flasher\Prime\Translation\Language\English;
use Flasher\Prime\Translation\Language\French;
use Flasher\Prime\Translation\Language\German;
use Flasher\Prime\Translation\Language\Portuguese;
use Flasher\Prime\Translation\Language\Russian;
use Flasher\Prime\Translation\Language\Spanish;
final readonly class Messages
{
/**
* @return array<string, string>
*/
public static function get(string $language): array
{
return match ($language) {
'ar' => Arabic::translations(),
'de' => German::translations(),
'en' => English::translations(),
'es' => Spanish::translations(),
'fr' => French::translations(),
'pt' => Portuguese::translations(),
'ru' => Russian::translations(),
'zh' => Chinese::translations(),
default => [],
};
}
}