refactor: extract rate formatting logic to RateService and add tests

هذا الالتزام موجود في:
2025-05-31 15:22:50 +03:00
الأصل b19748ef20
التزام cc4e74f3f1
13 ملفات معدلة مع 278 إضافات و56 حذوفات

عرض الملف

@@ -19,6 +19,14 @@ class CityFactory extends Factory
{
return [
'name' => fake()->randomElement(City::supportedCities()),
'label' => function ($attributes) {
return match ($attributes['name']) {
City::SANAA => 'صنعاء',
City::ADEN => 'عدن',
default => $attributes['name'],
};
},
];
}
@@ -26,7 +34,6 @@ class CityFactory extends Factory
{
return $this->state([
'name' => City::SANAA,
'label' => 'صنعاء',
]);
}
@@ -34,7 +41,6 @@ class CityFactory extends Factory
{
return $this->state([
'name' => City::ADEN,
'label' => 'عدن',
]);
}
}