Passed
Push — master ( b32b47...895563 )
by Observer
01:24
created
after_install.php 1 patch
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,17 +4,22 @@
 block discarded – undo
4 4
 
5 5
 function dir_copy (string $from, string $to): bool
6 6
 {
7
-    if (!is_dir ($from))
8
-        return false;
7
+    if (!is_dir ($from)) {
8
+            return false;
9
+    }
9 10
 
10
-    if (!is_dir ($to))
11
-        mkdir ($to);
11
+    if (!is_dir ($to)) {
12
+            mkdir ($to);
13
+    }
12 14
 
13
-    foreach (array_slice (scandir ($from), 2) as $file)
14
-        if (is_dir ($f = $from .'/'. $file))
15
+    foreach (array_slice (scandir ($from), 2) as $file) {
16
+            if (is_dir ($f = $from .'/'. $file))
15 17
             dir_copy ($f, $to .'/'. $file);
18
+    }
16 19
 
17
-        else copy ($f, $to .'/'. $file);
20
+        else {
21
+            copy ($f, $to .'/'. $file);
22
+        }
18 23
 
19 24
     return true;
20 25
 }
Please login to merge, or discard this patch.