@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | public function get(string $pageId): ?Page |
14 | 14 | { |
15 | 15 | $pageModel = PageModel::where('page_id', $pageId)->first(); |
16 | - if(!isset($pageModel)){ |
|
16 | + if (!isset($pageModel)) { |
|
17 | 17 | return null; |
18 | 18 | } |
19 | 19 | return new Page($pageModel->page_id, $pageModel->dry); |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | public function save(Page $page) |
23 | 23 | { |
24 | 24 | $pageModel = PageModel::where('page_id', $page->pageId())->first(); |
25 | - if(!isset($pageModel)){ |
|
25 | + if (!isset($pageModel)) { |
|
26 | 26 | $pageModel = new PageModel(); |
27 | 27 | } |
28 | 28 | $pageModel->page_id = $page->pageId(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | ->where('page_id', $interaction->pageId()) |
22 | 22 | ->first(); |
23 | 23 | |
24 | - if($interactionModel === null) { |
|
24 | + if ($interactionModel === null) { |
|
25 | 25 | $interactionModel = new InteractionModel(); |
26 | 26 | $interactionModel->{$canInteract->key()} = isset($user->id) ? $user->id : $canInteract->identifier(); |
27 | 27 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | ->where('page_id', $pageId) |
42 | 42 | ->first(); |
43 | 43 | |
44 | - if(!isset($interactionModel)){ |
|
44 | + if (!isset($interactionModel)) { |
|
45 | 45 | return null; |
46 | 46 | } |
47 | 47 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | interface InteractionRepository |
11 | 11 | { |
12 | 12 | public function save(CanInteract $canInteract, Interaction $interaction); |
13 | - public function getByInteractUser(CanInteract $canInteract, int $pageId):?Interaction; |
|
13 | + public function getByInteractUser(CanInteract $canInteract, int $pageId): ?Interaction; |
|
14 | 14 | public function transfer(CanInteract $anonymous, CanInteract $registered); |
15 | 15 | public function getCountInteractionsOnPage(int $pageId):array; |
16 | 16 | } |
@@ -27,7 +27,7 @@ |
||
27 | 27 | $queryPages = '?action=query&redirects=true&prop=info&format=json&titles='; |
28 | 28 | |
29 | 29 | $pages = []; |
30 | - PageModel::query()->where('dry', true)->chunk(100, function ($item) use($pages){ |
|
30 | + PageModel::query()->where('dry', true)->chunk(100, function($item) use($pages){ |
|
31 | 31 | $pages[] = $item->title; |
32 | 32 | }); |
33 | 33 |