Completed
Pull Request — master (#70)
by guillaume
07:08
created
app/Src/UseCases/Infra/Sql/PageRepositorySql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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();
Please login to merge, or discard this patch.
app/Src/UseCases/Infra/Sql/InteractionPageRepositorySql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Ports/InteractionRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
app/Console/Commands/ImportPageFromWiki.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.