Passed
Pull Request — master (#78)
by guillaume
06:46
created
app/Src/UseCases/Domain/Context/UseCases/AddCharacteristicsToContext.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
         $pages = $this->pageRepository->getByIds($pagesIds);
37 37
 
38 38
         $characteristics = [];
39
-        foreach ($pages as $page){
39
+        foreach ($pages as $page) {
40 40
             $characteristic = $this->characteristicsRepository->getByPageId($page->pageId());
41
-            if(!isset($characteristic)){
41
+            if (!isset($characteristic)) {
42 42
                 $characteristic = $page->createCharacteristicAssociated();
43 43
             }
44 44
             $characteristics[] = $characteristic->id();
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Context/Queries/SearchStructure.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
app/Src/UseCases/Domain/Shared/Model/Dto.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,10 +13,10 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
         foreach ($properties as $key => $property){
17 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
         }
Please login to merge, or discard this patch.