Passed
Pull Request — master (#78)
by guillaume
06:37
created
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 toArray(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->toArray(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->toArray(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.
app/Src/UseCases/Domain/Context/Dto/ContextDto.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
         $this->department = $departmentNumber;
41 41
         $this->fullname = $this->fullname();
42 42
         $characteristicsByType = [];
43
-        foreach($characteristics as $characteristic){
43
+        foreach ($characteristics as $characteristic) {
44 44
             $characteristicsByType[$characteristic->type()][] = $characteristic;
45 45
         }
46 46
 
Please login to merge, or discard this patch.
app/Src/UseCases/Infra/Sql/Model/ContextModel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,12 +26,12 @@
 block discarded – undo
26 26
 
27 27
     public function toDto():ContextDto
28 28
     {
29
-        $characteristics = $this->user->characteristics()->get()->transform(function(CharacteristicsModel $item){
29
+        $characteristics = $this->user->characteristics()->get()->transform(function(CharacteristicsModel $item) {
30 30
             return $item->toDto();
31 31
         });
32 32
         $characteristicDepartment = CharacteristicsModel::query()->where('code', $this->department_number)->first();
33 33
 
34
-        if(isset($characteristicDepartment)){
34
+        if (isset($characteristicDepartment)) {
35 35
             $characteristics->push($characteristicDepartment->toDto());
36 36
         }
37 37
 
Please login to merge, or discard this patch.