Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class LocaleChangedEventSubscriber |
||
10 | { |
||
11 | /** |
||
12 | * Handle the event. |
||
13 | * |
||
14 | * @param object $event |
||
15 | * |
||
16 | * @return string |
||
17 | */ |
||
18 | public static function changeLocale($event): string |
||
19 | { |
||
20 | App::make(Locale::class)->setCurrentLocaleAttribute($event->locale); |
||
21 | |||
22 | return $event->locale; |
||
23 | } |
||
24 | |||
25 | /** |
||
26 | * Register the listeners for the subscriber. |
||
27 | * |
||
28 | * @param object $events |
||
29 | */ |
||
30 | public function subscribe($events) |
||
33 | } |
||
34 | } |
||
35 |