@@ -10,57 +10,57 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | return [ |
| 12 | 12 | |
| 13 | - 'ok' => 'Tamam', |
|
| 14 | - 'no_error_message' => 'Hata #:api_code', |
|
| 13 | + 'ok' => 'Tamam', |
|
| 14 | + 'no_error_message' => 'Hata #:api_code', |
|
| 15 | 15 | |
| 16 | - // Used by Exception Handler Helper (when used) |
|
| 17 | - 'uncaught_exception' => 'Yakalanmamış Hata: :message', |
|
| 18 | - 'http_exception' => 'HTTP Hatası: :message', |
|
| 16 | + // Used by Exception Handler Helper (when used) |
|
| 17 | + 'uncaught_exception' => 'Yakalanmamış Hata: :message', |
|
| 18 | + 'http_exception' => 'HTTP Hatası: :message', |
|
| 19 | 19 | |
| 20 | - // HttpException handler (added in 6.4.0) |
|
| 21 | - // Error messages for HttpException caught w/o custom messages |
|
| 22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
| 23 | - // Turkish Translated from https://tr.wikipedia.org/wiki/HTTP_durum_kodlar%C4%B1 |
|
| 24 | - 'http_400' => 'Kötü İstek', |
|
| 25 | - 'http_401' => 'Yetkisiz', |
|
| 26 | - 'http_402' => 'Ödeme Gerekli', |
|
| 27 | - 'http_403' => 'Yasaklandı', |
|
| 28 | - 'http_404' => 'Sayfa Bulunamadı', |
|
| 29 | - 'http_405' => 'İzin Verilmeyen Metod', |
|
| 30 | - 'http_406' => 'Kabul Edilemez', |
|
| 31 | - 'http_407' => 'Proxy Sunucusunda Giriş Yapmak Gerekli', |
|
| 32 | - 'http_408' => 'İstek Zaman Aşamına Uğradı', |
|
| 33 | - 'http_409' => 'Çakışma', |
|
| 34 | - 'http_410' => 'Bak', |
|
| 35 | - 'http_411' => 'Uzunluk Gerekli', |
|
| 36 | - 'http_412' => 'Ön Koşul Başarısız', |
|
| 37 | - 'http_413' => 'Girilen Veri Çok Fazla', |
|
| 38 | - 'http_414' => 'URI Çok Uzun', |
|
| 39 | - 'http_415' => 'Desteklenmeyen Medya Tipi', |
|
| 40 | - 'http_416' => 'İstenen Aralık Kabul Edilemez', |
|
| 41 | - 'http_417' => 'Beklenti Başarısız', |
|
| 42 | - 'http_421' => 'Yanlış Yönlendirilmiş Talep', |
|
| 43 | - 'http_422' => 'İşlenemeyen Varlık', |
|
| 44 | - 'http_423' => 'Kilitli', |
|
| 45 | - 'http_424' => 'Başarısız Bağımlılık', |
|
| 46 | - 'http_425' => 'Çok Erken', |
|
| 47 | - 'http_426' => 'Güncelleme Gerekli', |
|
| 48 | - 'http_428' => 'Ön Koşul Gerekli', |
|
| 49 | - 'http_429' => 'Çok Fazla İstek Gönderildi', |
|
| 50 | - 'http_431' => 'İstek Başlık Alanları Çok Büyük', |
|
| 51 | - 'http_451' => 'Yasal Nedenlerle Gösterilemiyor', |
|
| 20 | + // HttpException handler (added in 6.4.0) |
|
| 21 | + // Error messages for HttpException caught w/o custom messages |
|
| 22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
| 23 | + // Turkish Translated from https://tr.wikipedia.org/wiki/HTTP_durum_kodlar%C4%B1 |
|
| 24 | + 'http_400' => 'Kötü İstek', |
|
| 25 | + 'http_401' => 'Yetkisiz', |
|
| 26 | + 'http_402' => 'Ödeme Gerekli', |
|
| 27 | + 'http_403' => 'Yasaklandı', |
|
| 28 | + 'http_404' => 'Sayfa Bulunamadı', |
|
| 29 | + 'http_405' => 'İzin Verilmeyen Metod', |
|
| 30 | + 'http_406' => 'Kabul Edilemez', |
|
| 31 | + 'http_407' => 'Proxy Sunucusunda Giriş Yapmak Gerekli', |
|
| 32 | + 'http_408' => 'İstek Zaman Aşamına Uğradı', |
|
| 33 | + 'http_409' => 'Çakışma', |
|
| 34 | + 'http_410' => 'Bak', |
|
| 35 | + 'http_411' => 'Uzunluk Gerekli', |
|
| 36 | + 'http_412' => 'Ön Koşul Başarısız', |
|
| 37 | + 'http_413' => 'Girilen Veri Çok Fazla', |
|
| 38 | + 'http_414' => 'URI Çok Uzun', |
|
| 39 | + 'http_415' => 'Desteklenmeyen Medya Tipi', |
|
| 40 | + 'http_416' => 'İstenen Aralık Kabul Edilemez', |
|
| 41 | + 'http_417' => 'Beklenti Başarısız', |
|
| 42 | + 'http_421' => 'Yanlış Yönlendirilmiş Talep', |
|
| 43 | + 'http_422' => 'İşlenemeyen Varlık', |
|
| 44 | + 'http_423' => 'Kilitli', |
|
| 45 | + 'http_424' => 'Başarısız Bağımlılık', |
|
| 46 | + 'http_425' => 'Çok Erken', |
|
| 47 | + 'http_426' => 'Güncelleme Gerekli', |
|
| 48 | + 'http_428' => 'Ön Koşul Gerekli', |
|
| 49 | + 'http_429' => 'Çok Fazla İstek Gönderildi', |
|
| 50 | + 'http_431' => 'İstek Başlık Alanları Çok Büyük', |
|
| 51 | + 'http_451' => 'Yasal Nedenlerle Gösterilemiyor', |
|
| 52 | 52 | |
| 53 | - 'http_500' => 'Dahili Sunucu Hatası', |
|
| 54 | - 'http_501' => 'Uygulanamadı', |
|
| 55 | - 'http_502' => 'Hatalı Ağ Geçidi', |
|
| 56 | - 'http_503' => 'Hizmet Kullanılamıyor', |
|
| 57 | - 'http_504' => 'Ağ Geçidi Zaman Aşımı', |
|
| 58 | - 'http_505' => 'HTTP Versiyonu Desteklenmiyor', |
|
| 59 | - 'http_506' => 'Varyant Ayrıca Müzakere Ediyor', |
|
| 60 | - 'http_507' => 'Yetersiz Depolama Alanı', |
|
| 61 | - 'http_508' => 'Döngü Algılandı', |
|
| 62 | - 'http_509' => 'Atanmamış', |
|
| 63 | - 'http_510' => 'Uzatılmamış', |
|
| 64 | - 'http_511' => 'Ağ Kimlik Doğrulaması Gerekli', |
|
| 53 | + 'http_500' => 'Dahili Sunucu Hatası', |
|
| 54 | + 'http_501' => 'Uygulanamadı', |
|
| 55 | + 'http_502' => 'Hatalı Ağ Geçidi', |
|
| 56 | + 'http_503' => 'Hizmet Kullanılamıyor', |
|
| 57 | + 'http_504' => 'Ağ Geçidi Zaman Aşımı', |
|
| 58 | + 'http_505' => 'HTTP Versiyonu Desteklenmiyor', |
|
| 59 | + 'http_506' => 'Varyant Ayrıca Müzakere Ediyor', |
|
| 60 | + 'http_507' => 'Yetersiz Depolama Alanı', |
|
| 61 | + 'http_508' => 'Döngü Algılandı', |
|
| 62 | + 'http_509' => 'Atanmamış', |
|
| 63 | + 'http_510' => 'Uzatılmamış', |
|
| 64 | + 'http_511' => 'Ağ Kimlik Doğrulaması Gerekli', |
|
| 65 | 65 | ]; |
| 66 | 66 | |
@@ -10,55 +10,55 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | return [ |
| 12 | 12 | |
| 13 | - 'ok' => 'حسناً', |
|
| 14 | - 'no_error_message' => 'خطأ #:api_code', |
|
| 13 | + 'ok' => 'حسناً', |
|
| 14 | + 'no_error_message' => 'خطأ #:api_code', |
|
| 15 | 15 | |
| 16 | - // Used by Exception Handler Helper (when used) |
|
| 17 | - 'uncaught_exception' => 'استثناء غير ممسك: :message', |
|
| 18 | - 'http_exception' => 'HTTP استثناء: :message', |
|
| 16 | + // Used by Exception Handler Helper (when used) |
|
| 17 | + 'uncaught_exception' => 'استثناء غير ممسك: :message', |
|
| 18 | + 'http_exception' => 'HTTP استثناء: :message', |
|
| 19 | 19 | |
| 20 | - // HttpException handler (added in 6.4.0) |
|
| 21 | - // Error messages for HttpException caught w/o custom messages |
|
| 22 | - // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
| 23 | - 'http_400' => 'طلب غير صحيح', |
|
| 24 | - 'http_401' => 'غير مصرح به', |
|
| 25 | - 'http_402' => 'الدفع مطلوب', |
|
| 26 | - 'http_403' => 'ممنوع', |
|
| 27 | - 'http_404' => 'لا يوجد', |
|
| 28 | - 'http_405' => 'الأسلوب غير مسموح به', |
|
| 29 | - 'http_406' => 'غير مقبول', |
|
| 30 | - 'http_407' => 'مطلوب مصادقة الوكيل', |
|
| 31 | - 'http_408' => 'انتهاء مهلة الطلب', |
|
| 32 | - 'http_409' => 'تضارب', |
|
| 33 | - 'http_410' => 'انتهى', |
|
| 34 | - 'http_411' => 'الطول مطلوب', |
|
| 35 | - 'http_412' => 'فشل الشروط المسبقة', |
|
| 36 | - 'http_413' => 'حمولة كبيرة جدا', |
|
| 37 | - 'http_414' => 'URI طويل جداً', |
|
| 38 | - 'http_415' => 'نوع الوسائط غير مدعوم', |
|
| 39 | - 'http_416' => 'النطاق غير قابل للرضا', |
|
| 40 | - 'http_417' => 'فشل التوقعات', |
|
| 41 | - 'http_421' => 'طلب توجيه خاطئ', |
|
| 42 | - 'http_422' => 'كيان غير قابل ل المعالجة', |
|
| 43 | - 'http_423' => 'مؤمن', |
|
| 44 | - 'http_424' => 'إعتمادية فاشلة', |
|
| 45 | - 'http_425' => 'مبكر جداً', |
|
| 46 | - 'http_426' => 'الترقية مطلوبة', |
|
| 47 | - 'http_428' => 'شرط مسبق مطلوب', |
|
| 48 | - 'http_429' => 'طلبات كثيرة جداً', |
|
| 49 | - 'http_431' => 'حقول رأس الطلب كبيرة جداً', |
|
| 50 | - 'http_451' => 'غير متوفر لأسباب قانونية', |
|
| 20 | + // HttpException handler (added in 6.4.0) |
|
| 21 | + // Error messages for HttpException caught w/o custom messages |
|
| 22 | + // https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml |
|
| 23 | + 'http_400' => 'طلب غير صحيح', |
|
| 24 | + 'http_401' => 'غير مصرح به', |
|
| 25 | + 'http_402' => 'الدفع مطلوب', |
|
| 26 | + 'http_403' => 'ممنوع', |
|
| 27 | + 'http_404' => 'لا يوجد', |
|
| 28 | + 'http_405' => 'الأسلوب غير مسموح به', |
|
| 29 | + 'http_406' => 'غير مقبول', |
|
| 30 | + 'http_407' => 'مطلوب مصادقة الوكيل', |
|
| 31 | + 'http_408' => 'انتهاء مهلة الطلب', |
|
| 32 | + 'http_409' => 'تضارب', |
|
| 33 | + 'http_410' => 'انتهى', |
|
| 34 | + 'http_411' => 'الطول مطلوب', |
|
| 35 | + 'http_412' => 'فشل الشروط المسبقة', |
|
| 36 | + 'http_413' => 'حمولة كبيرة جدا', |
|
| 37 | + 'http_414' => 'URI طويل جداً', |
|
| 38 | + 'http_415' => 'نوع الوسائط غير مدعوم', |
|
| 39 | + 'http_416' => 'النطاق غير قابل للرضا', |
|
| 40 | + 'http_417' => 'فشل التوقعات', |
|
| 41 | + 'http_421' => 'طلب توجيه خاطئ', |
|
| 42 | + 'http_422' => 'كيان غير قابل ل المعالجة', |
|
| 43 | + 'http_423' => 'مؤمن', |
|
| 44 | + 'http_424' => 'إعتمادية فاشلة', |
|
| 45 | + 'http_425' => 'مبكر جداً', |
|
| 46 | + 'http_426' => 'الترقية مطلوبة', |
|
| 47 | + 'http_428' => 'شرط مسبق مطلوب', |
|
| 48 | + 'http_429' => 'طلبات كثيرة جداً', |
|
| 49 | + 'http_431' => 'حقول رأس الطلب كبيرة جداً', |
|
| 50 | + 'http_451' => 'غير متوفر لأسباب قانونية', |
|
| 51 | 51 | |
| 52 | - 'http_500' => 'خطأ داخلي في الخادم', |
|
| 53 | - 'http_501' => 'لم يتم تنفيذه', |
|
| 54 | - 'http_502' => 'بوابة غير صالحة', |
|
| 55 | - 'http_503' => 'الخدمة غير متوفرة', |
|
| 56 | - 'http_504' => 'مهلة المنفذ', |
|
| 57 | - 'http_505' => 'إصدار HTTP غير مدعوم', |
|
| 58 | - 'http_506' => 'البديل أيضاً يتفاوض', |
|
| 59 | - 'http_507' => 'تخزين غير كاف', |
|
| 60 | - 'http_508' => 'تم الكشف عن حلقة تكرار', |
|
| 61 | - 'http_509' => 'غير معين', |
|
| 62 | - 'http_510' => 'غير موسعة', |
|
| 63 | - 'http_511' => 'مطلوب مصادقة شبكة الاتصال', |
|
| 52 | + 'http_500' => 'خطأ داخلي في الخادم', |
|
| 53 | + 'http_501' => 'لم يتم تنفيذه', |
|
| 54 | + 'http_502' => 'بوابة غير صالحة', |
|
| 55 | + 'http_503' => 'الخدمة غير متوفرة', |
|
| 56 | + 'http_504' => 'مهلة المنفذ', |
|
| 57 | + 'http_505' => 'إصدار HTTP غير مدعوم', |
|
| 58 | + 'http_506' => 'البديل أيضاً يتفاوض', |
|
| 59 | + 'http_507' => 'تخزين غير كاف', |
|
| 60 | + 'http_508' => 'تم الكشف عن حلقة تكرار', |
|
| 61 | + 'http_509' => 'غير معين', |
|
| 62 | + 'http_510' => 'غير موسعة', |
|
| 63 | + 'http_511' => 'مطلوب مصادقة شبكة الاتصال', |
|
| 64 | 64 | ]; |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | * @return \Symfony\Component\HttpFoundation\Response |
| 74 | 74 | */ |
| 75 | 75 | protected static function processException(\Throwable $ex, array $ex_cfg, |
| 76 | - int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR) |
|
| 76 | + int $fallback_http_code = HttpResponse::HTTP_INTERNAL_SERVER_ERROR) |
|
| 77 | 77 | { |
| 78 | 78 | $api_code = $ex_cfg['api_code']; |
| 79 | 79 | $http_code = $ex_cfg['http_code'] ?? $fallback_http_code; |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * @return HttpResponse |
| 141 | 141 | */ |
| 142 | 142 | protected function unauthenticated(/** @scrutinizer ignore-unused */ $request, |
| 143 | - AuthException $exception): HttpResponse |
|
| 143 | + AuthException $exception): HttpResponse |
|
| 144 | 144 | { |
| 145 | 145 | $cfg = self::getExceptionHandlerConfig(); |
| 146 | 146 | |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * @return HttpResponse |
| 162 | 162 | */ |
| 163 | 163 | protected static function error(Throwable $ex, |
| 164 | - int $api_code, int $http_code = null, string $error_message = null): HttpResponse |
|
| 164 | + int $api_code, int $http_code = null, string $error_message = null): HttpResponse |
|
| 165 | 165 | { |
| 166 | 166 | $ex_http_code = ($ex instanceof HttpException) ? $ex->getStatusCode() : $ex->getCode(); |
| 167 | 167 | $http_code = $http_code ?? $ex_http_code; |
@@ -22,19 +22,19 @@ |
||
| 22 | 22 | */ |
| 23 | 23 | final class ToArrayConverter implements ConverterContract |
| 24 | 24 | { |
| 25 | - /** |
|
| 26 | - * Returns array representation of the object. |
|
| 27 | - * |
|
| 28 | - * @param object $obj Object to be converted |
|
| 29 | - * @param array $config Converter config array to be used for this object (based on exact class |
|
| 30 | - * name match or inheritance). |
|
| 31 | - * |
|
| 32 | - * @return array |
|
| 33 | - */ |
|
| 34 | - public function convert(object $obj, /** @scrutinizer ignore-unused */ array $config): array |
|
| 35 | - { |
|
| 36 | - Validator::assertIsObject('obj', $obj); |
|
| 25 | + /** |
|
| 26 | + * Returns array representation of the object. |
|
| 27 | + * |
|
| 28 | + * @param object $obj Object to be converted |
|
| 29 | + * @param array $config Converter config array to be used for this object (based on exact class |
|
| 30 | + * name match or inheritance). |
|
| 31 | + * |
|
| 32 | + * @return array |
|
| 33 | + */ |
|
| 34 | + public function convert(object $obj, /** @scrutinizer ignore-unused */ array $config): array |
|
| 35 | + { |
|
| 36 | + Validator::assertIsObject('obj', $obj); |
|
| 37 | 37 | |
| 38 | - return $obj->toArray(null); |
|
| 39 | - } |
|
| 38 | + return $obj->toArray(null); |
|
| 39 | + } |
|
| 40 | 40 | } |