Completed
Push — master ( 57b1db...16daf9 )
by Mike
03:22
created
src/Data/Manager.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      *
44 44
      * Examples: 7.6.1 -> 7.6.1.0, 7.7 -> 7.7.1, 7.8 -> 7.8.0.0
45 45
      *
46
-     * @param $flav
46
+     * @param string $flav
47 47
      * @param null $baseVersion
48 48
      *
49 49
      * @return mixed
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
     /**
100 100
      * Gets all required information to perform health check.
101 101
      *
102
-     * @param $version
102
+     * @param string $version
103 103
      *
104 104
      * @return mixed
105 105
      */
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
     /**
112 112
      * Gets all required information to perform upgrade.
113 113
      *
114
-     * @param $version
114
+     * @param string $version
115 115
      *
116 116
      * @return mixed
117 117
      */
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      *
126 126
      * @param Upgrade $context
127 127
      *
128
-     * @return mixed
128
+     * @return Upgrade
129 129
      */
130 130
     public function getPotentiallyBrokenCustomizations(Upgrade $context)
131 131
     {
Please login to merge, or discard this patch.
src/Data/Provider/SourceCode/LocalUpgradePackages.php 2 patches
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     }
46 46
 
47 47
     /**
48
-     * @param $buildPath
48
+     * @param string $buildPath
49 49
      * @param $packages
50 50
      *
51 51
      * @return array
@@ -141,8 +141,8 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Gets flav specific packages
143 143
      *
144
-     * @param $flav
145
-     * @param $packagesPath
144
+     * @param string $flav
145
+     * @param string $packagesPath
146 146
      *
147 147
      * @return array
148 148
      */
@@ -196,8 +196,8 @@  discard block
 block discarded – undo
196 196
      * Calculates an array of possible upgrade chains
197 197
      *
198 198
      * @param $packages
199
-     * @param $buildVersion
200
-     * @param $upgradeTo
199
+     * @param string $buildVersion
200
+     * @param string $upgradeTo
201 201
      *
202 202
      * @return array
203 203
      */
Please login to merge, or discard this 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.
src/Element/Section/UpgradeChanges.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
     /**
34 34
      * @param Upgrade $context
35 35
      *
36
-     * @return bool
36
+     * @return string
37 37
      */
38 38
     public function isRelevantTo(Upgrade $context)
39 39
     {
Please login to merge, or discard this patch.
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.