@@ -20,7 +20,7 @@ public function setLocale(Request $request, string $locale): Response|JsonRespon
2020 // Validate locale against supported locales
2121 $ supportedLocales = ['en ' , 'ckb ' , 'ar ' ];
2222
23- if (!in_array ($ locale , $ supportedLocales )) {
23+ if (! in_array ($ locale , $ supportedLocales )) {
2424 return response ('Invalid locale ' , 400 );
2525 }
2626
@@ -31,7 +31,7 @@ public function setLocale(Request $request, string $locale): Response|JsonRespon
3131 App::setLocale ($ locale );
3232
3333 // Get dynamic docs route prefix from config
34- $ docsPrefix = '/ ' . config ('pertuk.route_prefix ' , 'docs ' ) . '/ ' ;
34+ $ docsPrefix = '/ ' . config ('pertuk.route_prefix ' , 'docs ' ). '/ ' ;
3535
3636 // If this is an AJAX request, return success with redirect URL if on docs page
3737 if ($ request ->ajax ()) {
@@ -65,11 +65,11 @@ private function getLocaleEquivalentUrl(string $url, string $locale): string
6565 {
6666 // Get dynamic docs route prefix from config
6767 $ docsPrefix = config ('pertuk.route_prefix ' , 'docs ' );
68- $ docsPrefixWithSlash = '/ ' . $ docsPrefix . '/ ' ;
68+ $ docsPrefixWithSlash = '/ ' . $ docsPrefix. '/ ' ;
6969
7070 // Extract the slug from the URL
7171 $ path = parse_url ($ url , PHP_URL_PATH );
72- if (!$ path || !str_starts_with ($ path , $ docsPrefixWithSlash )) {
72+ if (! $ path || ! str_starts_with ($ path , $ docsPrefixWithSlash )) {
7373 return url ($ docsPrefix );
7474 }
7575
@@ -95,6 +95,6 @@ private function getLocaleEquivalentUrl(string $url, string $locale): string
9595 $ newSlug .= '.ckb ' ;
9696 }
9797
98- return url ($ docsPrefix . '/ ' . $ newSlug );
98+ return url ($ docsPrefix. '/ ' . $ newSlug );
9999 }
100100}
0 commit comments