@@ -14,9 +14,9 @@ |
||
14 | 14 | $uri = config('wiki.api_uri').'?action=query&list=search&srwhat=text&srsearch='.$search.'&srqiprofile=classic_noboostlinks&srnamespace=3000&format=json'; |
15 | 15 | $response = $client->get($uri); |
16 | 16 | $content = json_decode($response->getBody()->getContents(), true); |
17 | - if(isset($content['query']['search'])){ |
|
17 | + if (isset($content['query']['search'])) { |
|
18 | 18 | $results = array_column($content['query']['search'], 'title'); |
19 | - return array_map(function ($item){ |
|
19 | + return array_map(function($item) { |
|
20 | 20 | return str_replace('Structure:', '', $item); |
21 | 21 | }, $results); |
22 | 22 | } |
@@ -13,10 +13,10 @@ |
||
13 | 13 | |
14 | 14 | private function serialize(array $properties) |
15 | 15 | { |
16 | - foreach ($properties as $key => $property){ |
|
17 | - if(is_object($property)){ |
|
16 | + foreach ($properties as $key => $property) { |
|
17 | + if (is_object($property)) { |
|
18 | 18 | $params[$this->camelToSnake($key)] = $this->serialize(get_object_vars($property)); |
19 | - }else { |
|
19 | + } else { |
|
20 | 20 | $params[$this->camelToSnake($key)] = $property; |
21 | 21 | } |
22 | 22 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $allCharacteristics = app(GetAllCharacteristics::class)->get(); |
35 | 35 | try { |
36 | 36 | $context = $contextQueryByUser->execute(Auth::user()->uuid)->toArray(); |
37 | - }catch (\Throwable $e){ |
|
37 | + } catch (\Throwable $e) { |
|
38 | 38 | Log::emergency($e->getMessage().' '.$e->getLine().' '.$e->getFile().' '.$e->getTraceAsString()); |
39 | 39 | return redirect()->route('wizard.profile'); |
40 | 40 | } |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $roles = app(GetUserRole::class)->get()->toArray(); |
44 | 44 | $practises = app(GetUserPractises::class)->get(Auth::user()->uuid); |
45 | 45 | $interactions = app(GetInteractionsByUser::class)->get(Auth::user()->uuid); |
46 | - $usersCharacteristics = array_merge($context['productions'], $context['characteristics'], $context['characteristics_departement']); |
|
46 | + $usersCharacteristics = array_merge($context['productions'], $context['characteristics'], $context['characteristics_departement']); |
|
47 | 47 | $uuidsUserCharacteristics = array_column($usersCharacteristics, 'uuid'); |
48 | 48 | $role = last($user['roles']); |
49 | 49 | $routeComment = route('profile.comments.show'); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $roles = app(GetUserRole::class)->get()->toArray(); |
73 | 73 | $practises = app(GetUserPractises::class)->get($userId); |
74 | 74 | $interactions = app(GetInteractionsByUser::class)->get($userId); |
75 | - $usersCharacteristics = array_merge($context['productions'], $context['characteristics']); |
|
75 | + $usersCharacteristics = array_merge($context['productions'], $context['characteristics']); |
|
76 | 76 | $uuidsUserCharacteristics = array_column($usersCharacteristics, 'uuid'); |
77 | 77 | $role = last($user['roles']); |
78 | 78 |