@@ -35,8 +35,8 @@ |
||
35 | 35 | |
36 | 36 | public function updateStatuses(array $patches, $status) |
37 | 37 | { |
38 | - return array_map(function (array $group) use ($status) { |
|
39 | - return array_map(function (array $patch) use ($status) { |
|
38 | + return array_map(function(array $group) use ($status) { |
|
39 | + return array_map(function(array $patch) use ($status) { |
|
40 | 40 | return array_replace($patch, array( |
41 | 41 | Patch::STATUS => $status |
42 | 42 | )); |
@@ -64,7 +64,7 @@ |
||
64 | 64 | |
65 | 65 | return $this->patchListUtils->applyDefinitionFilter( |
66 | 66 | $patches, |
67 | - function ($patchData) use ($excludedPatches) { |
|
67 | + function($patchData) use ($excludedPatches) { |
|
68 | 68 | $owner = $patchData[PatchDefinition::OWNER]; |
69 | 69 | $source = $patchData[PatchDefinition::SOURCE]; |
70 | 70 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | return $this->patchListUtils->applyDefinitionFilter( |
43 | 43 | $patches, |
44 | - function ($patchData) use ($packageName) { |
|
44 | + function($patchData) use ($packageName) { |
|
45 | 45 | if (!$patchData[PatchDefinition::LOCAL]) { |
46 | 46 | return true; |
47 | 47 | } |
@@ -118,10 +118,10 @@ discard block |
||
118 | 118 | { |
119 | 119 | $pathFlags = array_fill_keys($this->getAllPaths($listB), true); |
120 | 120 | |
121 | - return array_map(function (array $group) use ($pathFlags) { |
|
121 | + return array_map(function(array $group) use ($pathFlags) { |
|
122 | 122 | return array_filter( |
123 | 123 | $group, |
124 | - function (array $item) use ($pathFlags) { |
|
124 | + function(array $item) use ($pathFlags) { |
|
125 | 125 | $path = $item[Patch::PATH] ? $item[Patch::PATH] : $item[Patch::URL]; |
126 | 126 | |
127 | 127 | return !isset($pathFlags[$path]); |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | { |
135 | 135 | $pathFlags = array_fill_keys($this->getAllPaths($listB), true); |
136 | 136 | |
137 | - return array_map(function (array $group) use ($pathFlags) { |
|
137 | + return array_map(function(array $group) use ($pathFlags) { |
|
138 | 138 | return array_filter( |
139 | 139 | $group, |
140 | - function (array $item) use ($pathFlags) { |
|
140 | + function(array $item) use ($pathFlags) { |
|
141 | 141 | $path = $item[Patch::PATH] ? $item[Patch::PATH] : $item[Patch::URL]; |
142 | 142 | |
143 | 143 | return isset($pathFlags[$path]); |
@@ -178,11 +178,11 @@ discard block |
||
178 | 178 | { |
179 | 179 | return array_reduce( |
180 | 180 | $patches, |
181 | - function ($result, array $group) { |
|
181 | + function($result, array $group) { |
|
182 | 182 | return array_merge( |
183 | 183 | $result, |
184 | 184 | array_values( |
185 | - array_map(function (array $item) { |
|
185 | + array_map(function(array $item) { |
|
186 | 186 | return $item[Patch::PATH] ? $item[Patch::PATH] : $item[Patch::URL]; |
187 | 187 | }, $group) |
188 | 188 | ) |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | $repository = $composer->getRepositoryManager()->getLocalRepository(); |
194 | 194 | |
195 | 195 | $result = $runtimeUtils->executeWithPostAction( |
196 | - function () use ($shouldUndo, $filters, $bootstrap, $isDevMode) { |
|
196 | + function() use ($shouldUndo, $filters, $bootstrap, $isDevMode) { |
|
197 | 197 | if ($shouldUndo && !array_filter($filters)) { |
198 | 198 | $bootstrap->stripPatches($isDevMode); |
199 | 199 | |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | |
203 | 203 | return $bootstrap->applyPatches($isDevMode); |
204 | 204 | }, |
205 | - function () use ($repository, $lockSanitizer) { |
|
205 | + function() use ($repository, $lockSanitizer) { |
|
206 | 206 | $repository->write(); |
207 | 207 | $lockSanitizer->sanitize(); |
208 | 208 | } |
@@ -36,7 +36,7 @@ |
||
36 | 36 | $allowedVendors = array_fill_keys($this->vendors, true); |
37 | 37 | return array_filter( |
38 | 38 | $packages, |
39 | - function (PackageInterface $package) use ($allowedVendors) { |
|
39 | + function(PackageInterface $package) use ($allowedVendors) { |
|
40 | 40 | $vendorName = strtok($package->getName(), ComposerConstants::PACKAGE_SEPARATOR); |
41 | 41 | |
42 | 42 | return isset($allowedVendors[$vendorName]); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | if ($dependsPatterns) { |
26 | 26 | $matches = array_filter( |
27 | 27 | array_keys($dependsPatterns), |
28 | - function ($pattern) use ($target) { |
|
28 | + function($pattern) use ($target) { |
|
29 | 29 | return preg_match('#' . $pattern . '#', $target); |
30 | 30 | } |
31 | 31 | ); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
68 | - $patterns = array_map(function ($candidate) { |
|
68 | + $patterns = array_map(function($candidate) { |
|
69 | 69 | return trim($candidate, '*') |
70 | 70 | ? str_replace(chr(32), '.*', preg_quote(str_replace('*', chr(32), $candidate), '#')) |
71 | 71 | : preg_quote($candidate); |
@@ -45,7 +45,7 @@ |
||
45 | 45 | |
46 | 46 | $output = ''; |
47 | 47 | |
48 | - $outputHandler = function ($type, $data) use ($logger, &$output) { |
|
48 | + $outputHandler = function($type, $data) use ($logger, &$output) { |
|
49 | 49 | $output .= $data; |
50 | 50 | |
51 | 51 | $logger->writeVerbose( |
@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | { |
14 | 14 | $groups = $this->createTargetsList($patches); |
15 | 15 | |
16 | - return array_map(function ($group) { |
|
17 | - $fingerprints = array_map(function ($item) { |
|
16 | + return array_map(function($group) { |
|
17 | + $fingerprints = array_map(function($item) { |
|
18 | 18 | return sprintf( |
19 | 19 | '%s, %s:%s', |
20 | 20 | isset($item[Patch::LABEL]) ? $item[Patch::LABEL] : '{no label}', |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | }, $group); |
25 | 25 | |
26 | 26 | $keys = array_map( |
27 | - function ($key, $item) { |
|
27 | + function($key, $item) { |
|
28 | 28 | return sprintf( |
29 | 29 | '%s%s%s', |
30 | 30 | $item[Patch::OWNER], |