Passed
Push — feature-family-log ( 893bac...9622c6 )
by Laurent
01:33
created
src/Administration/Infrastructure/FamilyLog/Mapper/FamilyLogModelMapper.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -26,21 +26,21 @@  discard block
 block discarded – undo
26 26
     {
27 27
         foreach ($familyLogs as $key => $familyLog) {
28 28
             if (0 === $key) {
29
-                ${'parent' . $key} = FamilyLog::create(
29
+                ${'parent'.$key} = FamilyLog::create(
30 30
                     FamilyLogUuid::fromString($familyLog['uuid']),
31 31
                     NameField::fromString($familyLog['label']),
32 32
                     (int) $familyLog['level']
33 33
                 );
34
-                $parent = ${'parent' . $key};
34
+                $parent = ${'parent'.$key};
35 35
             } else {
36
-                ${'parent' . $key} = FamilyLog::create(
36
+                ${'parent'.$key} = FamilyLog::create(
37 37
                     FamilyLogUuid::fromString($familyLog['uuid']),
38 38
                     NameField::fromString($familyLog['label']),
39 39
                     (int) $familyLog['level'],
40
-                    ${'parent' . ($key - 1)}
40
+                    ${'parent'.($key - 1)}
41 41
                 );
42
-                unset(${'parent' . ($key - 1)});
43
-                $parent = ${'parent' . $key};
42
+                unset(${'parent'.($key - 1)});
43
+                $parent = ${'parent'.$key};
44 44
             }
45 45
         }
46 46
 
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
             );
77 77
         }
78 78
 
79
-        \usort($data, static function ($a, $b) {
79
+        \usort($data, static function($a, $b) {
80 80
             return \strcmp($a['level'], $b['level']);
81 81
         });
82 82
 
83 83
         foreach ($data as $datum) {
84
-            \array_map(static function (FamilyLog $familyLog) use ($datum, $familyLogs): void {
84
+            \array_map(static function(FamilyLog $familyLog) use ($datum, $familyLogs): void {
85 85
                 if (null !== $datum['parent_id'] && ($datum['uuid'] === $familyLog->uuid())) {
86 86
                     $familyLog->attributeParent($familyLogs[$datum['parent_id']]);
87 87
                 }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         return new FamilyLogs(
92
-            ...\array_map(function (FamilyLog $familyLog) {
92
+            ...\array_map(function(FamilyLog $familyLog) {
93 93
                 return $this->createReadModelFromDomain($familyLog);
94 94
             }, \array_values($familyLogs))
95 95
         );
Please login to merge, or discard this patch.
Persistence/DoctrineOrm/Repositories/DoctrineFamilyLogRepository.php 1 patch
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 )
66 66
 SELECT DISTINCT uuid, parent_id, label, level, path, slug FROM cte
67 67
 ORDER BY level
68
-SQL;
68
+sql;
69 69
 
70 70
         // Get parents
71 71
         $result = $this->connection->executeQuery($query, ['uuid' => $uuid])->fetchAllAssociative();
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 )
96 96
 SELECT DISTINCT uuid, parent_id, label, level, path, slug FROM cte
97 97
 ORDER BY level
98
-SQL;
98
+sql;
99 99
         // Get children
100 100
         $result = $this->connection->executeQuery($query, ['uuid' => $uuid])->fetchAllAssociative();
101 101
 
Please login to merge, or discard this patch.