Passed
Push — master ( 7f432b...ca1bbc )
by Anton
02:19
created
src/Snapshots/FileSnapshotter.php 1 patch
Braces   +13 added lines, -6 removed lines patch added patch discarded remove patch
@@ -69,7 +69,8 @@  discard block
 block discarded – undo
69 69
     {
70 70
         $snapshot = new Snapshot($this->getID($e), $e);
71 71
 
72
-        if ($this->logger !== null) {
72
+        if ($this->logger !== null)
73
+        {
73 74
             $this->logger->error($snapshot->getMessage());
74 75
         }
75 76
 
@@ -101,17 +102,23 @@  discard block
 block discarded – undo
101 102
     protected function rotateSnapshots(): void
102 103
     {
103 104
         $finder = new Finder();
104
-        $finder->in($this->directory)->sort(function (SplFileInfo $a, SplFileInfo $b) {
105
+        $finder->in($this->directory)->sort(function (SplFileInfo $a, SplFileInfo $b)
106
+        {
105 107
             return $b->getMTime() - $a->getMTime();
106 108
         });
107 109
 
108 110
         $count = 0;
109
-        foreach ($finder as $file) {
111
+        foreach ($finder as $file)
112
+        {
110 113
             $count++;
111
-            if ($count > $this->maxFiles) {
112
-                try {
114
+            if ($count > $this->maxFiles)
115
+            {
116
+                try
117
+                {
113 118
                     $this->files->delete($file->getRealPath());
114
-                } catch (FilesException $e) {
119
+                }
120
+                catch (FilesException $e)
121
+                {
115 122
                     // ignore
116 123
                 }
117 124
             }
Please login to merge, or discard this patch.