Completed
Push — master ( 98b610...0a37b7 )
by Mike
08:26
created
src/Purifier/Html.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
         $path = parse_url($base, PHP_URL_PATH);
85 85
         $scheme = parse_url($base, PHP_URL_SCHEME);
86 86
 
87
-        return preg_replace_callback($pattern, function ($matches) use ($base, $scheme, $host, $path) {
87
+        return preg_replace_callback($pattern, function($matches) use ($base, $scheme, $host, $path) {
88 88
             $hrefValue = $matches[0];
89 89
 
90 90
             if (mb_strpos($hrefValue, '//') === 0) {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
     private function convertCode($content)
150 150
     {
151 151
         // strpos with array support
152
-        $strposa = function ($haystack, $needles = []) {
152
+        $strposa = function($haystack, $needles = []) {
153 153
             $chr = [];
154 154
             foreach ($needles as $needle) {
155 155
                 $res = mb_strpos($haystack, $needle);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $content = str_replace(['<pre>', '<pre ', '</pre>'], ['<code>', '<code ', '</code>'], $content);
169 169
 
170
-        return preg_replace_callback('/<code(.*?)>(.*?)<\/code>/s', function ($matches) use ($strposa) {
170
+        return preg_replace_callback('/<code(.*?)>(.*?)<\/code>/s', function($matches) use ($strposa) {
171 171
             $noLineBreaks = str_replace(["\r\n", "\r", "\n"], '<br />', $matches[0]);
172 172
             $code = str_replace(['<br></br>', '<br>', '<br/>', '<br />'], PHP_EOL, $noLineBreaks);
173 173
 
Please login to merge, or discard this patch.
src/Spec/Generator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
             $title = $this->formatter->asTitle(sprintf('SugarCRM upgrade: %s', $context)) . $delimiter;
57 57
 
58 58
             return $title . implode($delimiter, array_map(
59
-                function ($element) use ($context) {
59
+                function($element) use ($context) {
60 60
                     return $this->elementGenerator->generate($element, $context);
61 61
                 },
62 62
                 $elements
Please login to merge, or discard this patch.
src/autoload.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@
 block discarded – undo
3 3
 // application or vendor context
4 4
 $autoload = [
5 5
     __DIR__ . '/../vendor/autoload.php', // application bin or phar
6
-    __DIR__ . '/../autoload.php',        // vendor bin
7
-    __DIR__ . '/../../../autoload.php',  // vendor
6
+    __DIR__ . '/../autoload.php', // vendor bin
7
+    __DIR__ . '/../../../autoload.php', // vendor
8 8
 ];
9 9
 
10 10
 foreach ($autoload as $file) {
Please login to merge, or discard this patch.
src/DI/Compiler/DataProviderPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $providerChain = $container->findDefinition('data.provider_chain');
21 21
 
22 22
         $taggedProviders = $container->findTaggedServiceIds('data.provider');
23
-        $providers = array_map(function ($id) {
23
+        $providers = array_map(function($id) {
24 24
             return new Reference($id);
25 25
         }, array_keys($taggedProviders));
26 26
 
Please login to merge, or discard this patch.
src/DI/Compiler/ConsoleCommandPass.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
         $application = $container->findDefinition('application');
21 21
 
22 22
         $taggedCommands = $container->findTaggedServiceIds('console.command');
23
-        $commands = array_map(function ($id) {
23
+        $commands = array_map(function($id) {
24 24
             return new Reference($id);
25 25
         }, array_keys($taggedCommands));
26 26
 
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.
src/Version/Graph/AdjacencyList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
         // add parent edges
35 35
         foreach ($versions as $version) {
36
-            $minorVersions = $versions->filter(function (Version $minorVersion) use ($version) {
36
+            $minorVersions = $versions->filter(function(Version $minorVersion) use ($version) {
37 37
                 return $minorVersion->isChildOf($version);
38 38
             });
39 39
 
Please login to merge, or discard this patch.
src/Version/OrderedList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
         }
22 22
 
23 23
         // sort versions (jASC)
24
-        usort($this->versions, function (Version $v1, Version $v2) {
24
+        usort($this->versions, function(Version $v1, Version $v2) {
25 25
             $v1 = (string) $v1->getFull();
26 26
             $v2 = (string) $v2->getFull();
27 27
 
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function merge(OrderedList $range, $checkAliases = false)
50 50
     {
51
-        $filtered = $range->filter(function (Version $version) use ($checkAliases) {
51
+        $filtered = $range->filter(function(Version $version) use ($checkAliases) {
52 52
             return !$this->contains($version, $checkAliases);
53 53
         });
54 54
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function contains(Version $version, $checkAliases = false)
65 65
     {
66 66
         if ($checkAliases) {
67
-            return in_array($version->getFull(), $this->map(function (Version $version) {
67
+            return in_array($version->getFull(), $this->map(function(Version $version) {
68 68
                 return $version->getFull();
69 69
             }));
70 70
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
     public function isEqualTo(OrderedList $range, $checkAliases = false)
108 108
     {
109 109
         if ($checkAliases) {
110
-            $getFull = function (Version $version) {
110
+            $getFull = function(Version $version) {
111 111
                 return $version->getFull();
112 112
             };
113 113
 
Please login to merge, or discard this patch.
src/Data/Provider/Doc/SupportSugarcrm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function getReleaseNotes($flav, OrderedList $versions)
90 90
     {
91
-        $newVersions = $versions->filter(function (Version $version) use ($flav) {
91
+        $newVersions = $versions->filter(function(Version $version) use ($flav) {
92 92
             return !$this->cache->has($this->getCacheKey([$flav, 'release_notes', (string) $version]));
93 93
         });
94 94
 
95
-        $requests = function () use ($flav, $newVersions) {
95
+        $requests = function() use ($flav, $newVersions) {
96 96
             foreach ($newVersions as $version) {
97
-                yield (string) $version => function () use ($flav, $version) {
97
+                yield (string) $version => function() use ($flav, $version) {
98 98
                     return $this->httpClient->getAsync($this->getReleaseNotesUri($flav, $version));
99 99
                 };
100 100
             }
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
         if (count($newVersions)) {
104 104
             $this->processRequestPool($requests, [
105
-                'fulfilled' => function (ResponseInterface $response, $version) use ($flav) {
105
+                'fulfilled' => function(ResponseInterface $response, $version) use ($flav) {
106 106
                     $html = $response->getBody()->getContents();
107 107
                     $crawler = new Crawler($this->purifyHtml($html, $this->getReleaseNotesUri($flav, new Version($version))));
108 108
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
                     $this->cache->set($this->getCacheKey([$flav, 'release_notes', $version]), $releaseNote);
134 134
                 },
135
-                'rejected' => function ($reason, $version) {
135
+                'rejected' => function($reason, $version) {
136 136
                     throw new \RuntimeException(
137 137
                         sprintf('Can\'t get release notes for version: %s (reason: %s)', $version, $reason)
138 138
                     );
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
     {
308 308
         $delimiter = '___';
309 309
 
310
-        return implode($delimiter, array_map(function ($key) {
310
+        return implode($delimiter, array_map(function($key) {
311 311
             return preg_replace('/[^a-zA-Z0-9_\.]+/', '', mb_strtolower($key));
312 312
         }, $keyParts));
313 313
     }
Please login to merge, or discard this patch.