@@ -72,6 +72,10 @@ discard block |
||
72 | 72 | return $pairs; |
73 | 73 | } |
74 | 74 | |
75 | + /** |
|
76 | + * @param string $source |
|
77 | + * @param string $target |
|
78 | + */ |
|
75 | 79 | private function getShortestPath($source, $target) |
76 | 80 | { |
77 | 81 | // array of the best estimates of shortest path to each vertex |
@@ -134,7 +138,7 @@ discard block |
||
134 | 138 | /** |
135 | 139 | * @param Version $from |
136 | 140 | * |
137 | - * @return OrderedList |
|
141 | + * @return \Sugarcrm\UpgradeSpec\Version\OrderedList |
|
138 | 142 | */ |
139 | 143 | private function getOriginVertexes(Version $from) |
140 | 144 | { |
@@ -152,7 +156,7 @@ discard block |
||
152 | 156 | /** |
153 | 157 | * @param Version $to |
154 | 158 | * |
155 | - * @return OrderedList |
|
159 | + * @return \Sugarcrm\UpgradeSpec\Version\OrderedList |
|
156 | 160 | */ |
157 | 161 | private function getDestinationVertexes(Version $to) |
158 | 162 | { |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public function __construct(AdjacencyList $adj) |
20 | 20 | { |
21 | 21 | foreach ($adj as $vertex => $list) { |
22 | - $list = array_map(function (Version $version) use ($vertex) { |
|
22 | + $list = array_map(function(Version $version) use ($vertex) { |
|
23 | 23 | return [(string) $version => (new Version($vertex))->isChildOf($version) ? 0 : 1]; |
24 | 24 | }, iterator_to_array($list)); |
25 | 25 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | $aliases = $aliases->merge($from->getAliases()); |
145 | 145 | } |
146 | 146 | |
147 | - return $aliases->filter(function (Version $version) { |
|
147 | + return $aliases->filter(function(Version $version) { |
|
148 | 148 | return isset($this->graph[(string) $version]); |
149 | 149 | }); |
150 | 150 | } |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | */ |
157 | 157 | private function getDestinationVertexes(Version $to) |
158 | 158 | { |
159 | - return $to->getAliases()->filter(function (Version $version) { |
|
159 | + return $to->getAliases()->filter(function(Version $version) { |
|
160 | 160 | return isset($this->graph[(string) $version]); |
161 | 161 | }); |
162 | 162 | } |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | $deletedFiles = array_diff(array_merge($deletedFiles, $packageDeletedFiles), $packageModifiedFiles); |
82 | 82 | } |
83 | 83 | |
84 | - $modifiedFiles = array_keys(array_filter($modifiedFiles, function ($package, $changedFile) use ($buildPath, $packageZips) { |
|
84 | + $modifiedFiles = array_keys(array_filter($modifiedFiles, function($package, $changedFile) use ($buildPath, $packageZips) { |
|
85 | 85 | if (($buildFile = @file_get_contents($buildPath . DS . $changedFile)) === false) { |
86 | 86 | return false; |
87 | 87 | } |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | $zip->close(); |
97 | 97 | } |
98 | 98 | |
99 | - $modifiedFiles = array_values(array_filter($modifiedFiles, function ($file) use ($buildPath) { |
|
99 | + $modifiedFiles = array_values(array_filter($modifiedFiles, function($file) use ($buildPath) { |
|
100 | 100 | return file_exists($buildPath . '/custom/' . $file); |
101 | 101 | })); |
102 | 102 | |
103 | - $deletedFiles = array_values(array_filter($deletedFiles, function ($file) use ($buildPath) { |
|
103 | + $deletedFiles = array_values(array_filter($deletedFiles, function($file) use ($buildPath) { |
|
104 | 104 | return file_exists($buildPath . '/custom/' . $file); |
105 | 105 | })); |
106 | 106 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $packages = $this->getFlavPackages($context->getBuildFlav(), $context->getTargetPath()); |
125 | 125 | $graph = new Dijkstra(new AdjacencyList($packages)); |
126 | 126 | |
127 | - $this->suitablePackages = array_map(function (array $hop) use ($packages) { |
|
127 | + $this->suitablePackages = array_map(function(array $hop) use ($packages) { |
|
128 | 128 | foreach ($packages as $path => $pair) { |
129 | 129 | if ((new OrderedList($hop))->isEqualTo(new OrderedList($pair))) { |
130 | 130 | return $path; |