Completed
Push — master ( 57b1db...16daf9 )
by Mike
03:22
created
src/Element/Provider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function getSuitableElements(Upgrade $context)
52 52
     {
53
-        $elements = array_filter($this->specElements, function (ElementInterface $element) use ($context) {
53
+        $elements = array_filter($this->specElements, function(ElementInterface $element) use ($context) {
54 54
             return $element->isRelevantTo($context);
55 55
         });
56 56
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         }
64 64
 
65 65
         // sort elements (ASC)
66
-        usort($elements, function (ElementInterface $a, ElementInterface $b) {
66
+        usort($elements, function(ElementInterface $a, ElementInterface $b) {
67 67
             return $a->getOrder() > $b->getOrder() ? 1 : ($a->getOrder() < $b->getOrder() ? -1 : 0);
68 68
         });
69 69
 
Please login to merge, or discard this patch.
src/Data/Provider/SourceCode/LocalUpgradePackages.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $deletedFiles = array_diff(array_merge($deletedFiles, $packageDeletedFiles), $packageModifiedFiles);
78 78
         }
79 79
 
80
-        $modifiedFiles = array_keys(array_filter($modifiedFiles, function ($package, $changedFile) use ($buildPath, $packageZips) {
80
+        $modifiedFiles = array_keys(array_filter($modifiedFiles, function($package, $changedFile) use ($buildPath, $packageZips) {
81 81
             if (($buildFile = @file_get_contents($buildPath . DS . $changedFile)) === false) {
82 82
                 return false;
83 83
             }
@@ -92,11 +92,11 @@  discard block
 block discarded – undo
92 92
             $zip->close();
93 93
         }
94 94
 
95
-        $modifiedFiles = array_values(array_filter($modifiedFiles, function ($file) use ($buildPath) {
95
+        $modifiedFiles = array_values(array_filter($modifiedFiles, function($file) use ($buildPath) {
96 96
             return file_exists($buildPath . '/custom/' . $file);
97 97
         }));
98 98
 
99
-        $deletedFiles = array_values(array_filter($deletedFiles, function ($file) use ($buildPath) {
99
+        $deletedFiles = array_values(array_filter($deletedFiles, function($file) use ($buildPath) {
100 100
             return file_exists($buildPath . '/custom/' . $file);
101 101
         }));
102 102
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             return $this->suitablePackages;
130 130
         }
131 131
 
132
-        usort($upgradeChains, function ($a1, $a2) {
132
+        usort($upgradeChains, function($a1, $a2) {
133 133
             return count($a1) < count($a2) ? -1 : (count($a1) > count($a2) ? 1 : 0);
134 134
         });
135 135
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $versionMatrix = $this->getVersionMatrix($packages);
212 212
         $allVersions = array_keys($versionMatrix);
213 213
 
214
-        $getExistingSubversions = function ($version) use ($allVersions) {
214
+        $getExistingSubversions = function($version) use ($allVersions) {
215 215
             $existingVersions = [];
216 216
 
217 217
             $fromParts = explode('.', $version);
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         };
227 227
 
228 228
         // init chains with starting versions
229
-        $chains = array_map(function ($version) use ($buildVersion) {
229
+        $chains = array_map(function($version) use ($buildVersion) {
230 230
             return [$version => $buildVersion];
231 231
         }, $getExistingSubversions($buildVersion));
232 232
 
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
         }
237 237
 
238 238
         // gets last key of assoc array
239
-        $getLastKey = function ($array) {
239
+        $getLastKey = function($array) {
240 240
             end($array);
241 241
 
242 242
             return key($array);
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $chains = $fullChains;
286 286
         }
287 287
 
288
-        $chains = array_map(function ($chain) use ($versionMatrix) {
288
+        $chains = array_map(function($chain) use ($versionMatrix) {
289 289
             $keys = array_keys($chain);
290 290
             $values = array_values($chain);
291 291
 
@@ -315,17 +315,17 @@  discard block
 block discarded – undo
315 315
      */
316 316
     private function getVersionMatrix($packages)
317 317
     {
318
-        $allVersions = array_unique(call_user_func_array('array_merge', array_map(function ($package) {
318
+        $allVersions = array_unique(call_user_func_array('array_merge', array_map(function($package) {
319 319
             return [$package['from'], $package['to']];
320 320
         }, $packages)));
321 321
 
322 322
         // sort versions (ASC)
323
-        usort($allVersions, function ($v1, $v2) {
323
+        usort($allVersions, function($v1, $v2) {
324 324
             return version_compare($v1, $v2, '<') ? -1 : (version_compare($v1, $v2, '>') ? 1 : 0);
325 325
         });
326 326
 
327 327
         // create matrix and fill it with zeros
328
-        $versionMatrix = call_user_func_array('array_merge',array_map(function ($version) use ($allVersions) {
328
+        $versionMatrix = call_user_func_array('array_merge', array_map(function($version) use ($allVersions) {
329 329
             return [$version => array_combine($allVersions, array_fill(0, count($allVersions), 0))];
330 330
         }, $allVersions));
331 331
 
Please login to merge, or discard this patch.