Completed
Push — dev5 ( d45a54...be76cd )
by Ron
09:51
created
app/Files.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
             $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : '';
41 41
             
42 42
             //  Look to see if a number is already appended to a file.  (example - file(1).pdf)
43
-            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) 
43
+            if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match))
44 44
             {
45 45
                 // Has a number, increment it
46 46
                 $base = $match[1];
47 47
                 $number = intVal($match[2]);
48
-            } 
49
-            else 
48
+            }
49
+            else
50 50
             {
51 51
                 // No number, add one
52 52
                 $base = $fileParts['filename'];
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             }
55 55
             
56 56
             //  Increase the number until one that is not in use is found
57
-            do 
57
+            do
58 58
             {
59 59
                 $fileName = $base.'('.++$number.')'.$extension;
60 60
             } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName));
Please login to merge, or discard this patch.