@@ -18,10 +18,10 @@ discard block |
||
18 | 18 | ') |
19 | 19 | ->join('users', 'users.id', 'interactions.user_id') |
20 | 20 | ->join('contexts', 'users.context_id', 'contexts.id') |
21 | - ->when($type === 'follow', function ($query) { |
|
21 | + ->when($type === 'follow', function($query) { |
|
22 | 22 | $query->where('follow', true); |
23 | 23 | }) |
24 | - ->when($type === 'do', function ($query) { |
|
24 | + ->when($type === 'do', function($query) { |
|
25 | 25 | $query->where('done', true); |
26 | 26 | }) |
27 | 27 | ->where('interactions.page_id', $pageId) |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | ->get(); |
31 | 31 | |
32 | 32 | $interactionsToReturn = []; |
33 | - foreach($interactions as $interaction){ |
|
33 | + foreach ($interactions as $interaction) { |
|
34 | 34 | $characteristicsModel = CharacteristicsModel::query()->where('code', $interaction->department)->first(); |
35 | 35 | $interaction->departmentData = $characteristicsModel; |
36 | 36 | $interactionsToReturn[] = $interaction->toArray(); |
@@ -49,10 +49,10 @@ discard block |
||
49 | 49 | ->join('contexts', 'users.context_id', 'contexts.id') |
50 | 50 | ->join('user_characteristics', 'user_characteristics.user_id', 'users.id') |
51 | 51 | ->join('characteristics', 'characteristics.id', 'user_characteristics.characteristic_id') |
52 | - ->when($type === 'follow', function ($query) { |
|
52 | + ->when($type === 'follow', function($query) { |
|
53 | 53 | $query->where('follow', true); |
54 | 54 | }) |
55 | - ->when($type === 'do', function ($query) { |
|
55 | + ->when($type === 'do', function($query) { |
|
56 | 56 | $query->where('done', true); |
57 | 57 | }) |
58 | 58 | ->where('interactions.page_id', $pageId) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | ->get(); |
65 | 65 | |
66 | 66 | $characteristicsToReturn = []; |
67 | - foreach($characteristicsCount as $characteristicCount){ |
|
67 | + foreach ($characteristicsCount as $characteristicCount) { |
|
68 | 68 | $characteristic = CharacteristicsModel::query()->find($characteristicCount->characteristic_id); |
69 | 69 | $characteristic->count = $characteristicCount->count; |
70 | 70 | $characteristicsToReturn[] = $characteristic->toArray(); |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | $httpClient = new Client(); |
26 | 26 | |
27 | - PageModel::query()->where('dry', true)->chunkById(50, function ($items, $count) use($httpClient){ |
|
27 | + PageModel::query()->where('dry', true)->chunkById(50, function($items, $count) use($httpClient){ |
|
28 | 28 | $this->info(($count*50).' Pages'); |
29 | 29 | $pages = $items->pluck('page_id')->toArray(); |
30 | 30 | $pagesApiUri = config('wiki.api_uri').$this->queryPages.implode('|', $pages); |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | $content = json_decode($response->getBody()->getContents(), true); |
33 | 33 | $wikiPages = $content['query']['pages']; |
34 | 34 | |
35 | - foreach($wikiPages as $page){ |
|
35 | + foreach ($wikiPages as $page) { |
|
36 | 36 | $pageModel = PageModel::query()->where('page_id', $page['pageid'])->first(); |
37 | 37 | |
38 | 38 | if (!isset($page['title'])) |