@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $i = 1; |
52 | 52 | foreach ($reportSummary->getChanged() as $file => $fixResult) { |
53 | 53 | $fileXML = $dom->createElement('file'); |
54 | - $fileXML->setAttribute('id', (string) $i++); |
|
54 | + $fileXML->setAttribute('id', (string)$i++); |
|
55 | 55 | $fileXML->setAttribute('name', $file); |
56 | 56 | $filesXML->appendChild($fileXML); |
57 | 57 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | $timeXML = $dom->createElement('time'); |
106 | 106 | $timeXML->setAttribute('unit', 's'); |
107 | 107 | $timeTotalXML = $dom->createElement('total'); |
108 | - $timeTotalXML->setAttribute('value', (string) $time); |
|
108 | + $timeTotalXML->setAttribute('value', (string)$time); |
|
109 | 109 | $timeXML->appendChild($timeTotalXML); |
110 | 110 | |
111 | 111 | return $timeXML; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | $memory = round($memory / 1024 / 1024, 3); |
117 | 117 | |
118 | 118 | $memoryXML = $dom->createElement('memory'); |
119 | - $memoryXML->setAttribute('value', (string) $memory); |
|
119 | + $memoryXML->setAttribute('value', (string)$memory); |
|
120 | 120 | $memoryXML->setAttribute('unit', 'MB'); |
121 | 121 | |
122 | 122 | return $memoryXML; |
@@ -42,7 +42,7 @@ |
||
42 | 42 | foreach ($change['appliedFixers'] as $fixerName) { |
43 | 43 | $report[] = [ |
44 | 44 | 'description' => $fixerName, |
45 | - 'fingerprint' => md5($fileName.$fixerName), |
|
45 | + 'fingerprint' => md5($fileName . $fixerName), |
|
46 | 46 | 'location' => [ |
47 | 47 | 'path' => $fileName, |
48 | 48 | 'lines' => [ |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $output .= PHP_EOL; |
52 | 52 | } |
53 | 53 | |
54 | - return $output.$this->getFooter($reportSummary->getTime(), $reportSummary->getMemory(), $reportSummary->isDryRun()); |
|
54 | + return $output . $this->getFooter($reportSummary->getTime(), $reportSummary->getMemory(), $reportSummary->isDryRun()); |
|
55 | 55 | } |
56 | 56 | |
57 | 57 | private function getAppliedFixers(bool $isDecoratedOutput, array $fixResult): string |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | PHP_EOL |
75 | 75 | )); |
76 | 76 | |
77 | - return PHP_EOL.$diffFormatter->format($fixResult['diff']).PHP_EOL; |
|
77 | + return PHP_EOL . $diffFormatter->format($fixResult['diff']) . PHP_EOL; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | private function getFooter(int $time, int $memory, bool $isDryRun): string |
@@ -83,8 +83,8 @@ discard block |
||
83 | 83 | return ''; |
84 | 84 | } |
85 | 85 | |
86 | - return PHP_EOL.sprintf( |
|
87 | - '%s all files in %.3f seconds, %.3f MB memory used'.PHP_EOL, |
|
86 | + return PHP_EOL . sprintf( |
|
87 | + '%s all files in %.3f seconds, %.3f MB memory used' . PHP_EOL, |
|
88 | 88 | $isDryRun ? 'Checked' : 'Fixed', |
89 | 89 | $time / 1000, |
90 | 90 | $memory / 1024 / 1024 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | { |
39 | 39 | $sets = $reportSummary->getSets(); |
40 | 40 | |
41 | - usort($sets, function (RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b) { |
|
41 | + usort($sets, function(RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b) { |
|
42 | 42 | return strcmp($a->getName(), $b->getName()); |
43 | 43 | }); |
44 | 44 |
@@ -38,17 +38,17 @@ |
||
38 | 38 | { |
39 | 39 | $sets = $reportSummary->getSets(); |
40 | 40 | |
41 | - usort($sets, function (RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b) { |
|
41 | + usort($sets, function(RuleSetDescriptionInterface $a, RuleSetDescriptionInterface $b) { |
|
42 | 42 | return strcmp($a->getName(), $b->getName()); |
43 | 43 | }); |
44 | 44 | |
45 | 45 | $output = ''; |
46 | 46 | |
47 | 47 | foreach ($sets as $i => $set) { |
48 | - $output .= sprintf('%2d) %s', $i + 1, $set->getName()).PHP_EOL.' '.$set->getDescription().PHP_EOL; |
|
48 | + $output .= sprintf('%2d) %s', $i + 1, $set->getName()) . PHP_EOL . ' ' . $set->getDescription() . PHP_EOL; |
|
49 | 49 | |
50 | 50 | if ($set->isRisky()) { |
51 | - $output .= ' Set contains risky rules.'.PHP_EOL; |
|
51 | + $output .= ' Set contains risky rules.' . PHP_EOL; |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | |
7 | 7 | class ComposerStaticInita88218e7a01457073015c9e64d4100d7 |
8 | 8 | { |
9 | - public static $files = array ( |
|
9 | + public static $files = array( |
|
10 | 10 | 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', |
11 | 11 | '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php', |
12 | 12 | '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | '23c18046f52bef3eea034657bafda50f' => __DIR__ . '/..' . '/symfony/polyfill-php81/bootstrap.php', |
20 | 20 | ); |
21 | 21 | |
22 | - public static $prefixLengthsPsr4 = array ( |
|
22 | + public static $prefixLengthsPsr4 = array( |
|
23 | 23 | 'S' => |
24 | - array ( |
|
24 | + array( |
|
25 | 25 | 'Symfony\\Polyfill\\Php81\\' => 23, |
26 | 26 | 'Symfony\\Polyfill\\Php80\\' => 23, |
27 | 27 | 'Symfony\\Polyfill\\Php73\\' => 23, |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | 'Symfony\\Component\\Console\\' => 26, |
43 | 43 | ), |
44 | 44 | 'P' => |
45 | - array ( |
|
45 | + array( |
|
46 | 46 | 'Psr\\Log\\' => 8, |
47 | 47 | 'Psr\\EventDispatcher\\' => 20, |
48 | 48 | 'Psr\\Container\\' => 14, |
@@ -50,129 +50,129 @@ discard block |
||
50 | 50 | 'PhpCsFixer\\' => 11, |
51 | 51 | ), |
52 | 52 | 'D' => |
53 | - array ( |
|
53 | + array( |
|
54 | 54 | 'Doctrine\\Common\\Lexer\\' => 22, |
55 | 55 | 'Doctrine\\Common\\Annotations\\' => 28, |
56 | 56 | ), |
57 | 57 | 'C' => |
58 | - array ( |
|
58 | + array( |
|
59 | 59 | 'Composer\\XdebugHandler\\' => 23, |
60 | 60 | 'Composer\\Semver\\' => 16, |
61 | 61 | ), |
62 | 62 | ); |
63 | 63 | |
64 | - public static $prefixDirsPsr4 = array ( |
|
64 | + public static $prefixDirsPsr4 = array( |
|
65 | 65 | 'Symfony\\Polyfill\\Php81\\' => |
66 | - array ( |
|
66 | + array( |
|
67 | 67 | 0 => __DIR__ . '/..' . '/symfony/polyfill-php81', |
68 | 68 | ), |
69 | 69 | 'Symfony\\Polyfill\\Php80\\' => |
70 | - array ( |
|
70 | + array( |
|
71 | 71 | 0 => __DIR__ . '/..' . '/symfony/polyfill-php80', |
72 | 72 | ), |
73 | 73 | 'Symfony\\Polyfill\\Php73\\' => |
74 | - array ( |
|
74 | + array( |
|
75 | 75 | 0 => __DIR__ . '/..' . '/symfony/polyfill-php73', |
76 | 76 | ), |
77 | 77 | 'Symfony\\Polyfill\\Php72\\' => |
78 | - array ( |
|
78 | + array( |
|
79 | 79 | 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', |
80 | 80 | ), |
81 | 81 | 'Symfony\\Polyfill\\Mbstring\\' => |
82 | - array ( |
|
82 | + array( |
|
83 | 83 | 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', |
84 | 84 | ), |
85 | 85 | 'Symfony\\Polyfill\\Intl\\Normalizer\\' => |
86 | - array ( |
|
86 | + array( |
|
87 | 87 | 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer', |
88 | 88 | ), |
89 | 89 | 'Symfony\\Polyfill\\Intl\\Grapheme\\' => |
90 | - array ( |
|
90 | + array( |
|
91 | 91 | 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme', |
92 | 92 | ), |
93 | 93 | 'Symfony\\Polyfill\\Ctype\\' => |
94 | - array ( |
|
94 | + array( |
|
95 | 95 | 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', |
96 | 96 | ), |
97 | 97 | 'Symfony\\Contracts\\Service\\' => |
98 | - array ( |
|
98 | + array( |
|
99 | 99 | 0 => __DIR__ . '/..' . '/symfony/service-contracts', |
100 | 100 | ), |
101 | 101 | 'Symfony\\Contracts\\EventDispatcher\\' => |
102 | - array ( |
|
102 | + array( |
|
103 | 103 | 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', |
104 | 104 | ), |
105 | 105 | 'Symfony\\Component\\String\\' => |
106 | - array ( |
|
106 | + array( |
|
107 | 107 | 0 => __DIR__ . '/..' . '/symfony/string', |
108 | 108 | ), |
109 | 109 | 'Symfony\\Component\\Stopwatch\\' => |
110 | - array ( |
|
110 | + array( |
|
111 | 111 | 0 => __DIR__ . '/..' . '/symfony/stopwatch', |
112 | 112 | ), |
113 | 113 | 'Symfony\\Component\\Process\\' => |
114 | - array ( |
|
114 | + array( |
|
115 | 115 | 0 => __DIR__ . '/..' . '/symfony/process', |
116 | 116 | ), |
117 | 117 | 'Symfony\\Component\\OptionsResolver\\' => |
118 | - array ( |
|
118 | + array( |
|
119 | 119 | 0 => __DIR__ . '/..' . '/symfony/options-resolver', |
120 | 120 | ), |
121 | 121 | 'Symfony\\Component\\Finder\\' => |
122 | - array ( |
|
122 | + array( |
|
123 | 123 | 0 => __DIR__ . '/..' . '/symfony/finder', |
124 | 124 | ), |
125 | 125 | 'Symfony\\Component\\Filesystem\\' => |
126 | - array ( |
|
126 | + array( |
|
127 | 127 | 0 => __DIR__ . '/..' . '/symfony/filesystem', |
128 | 128 | ), |
129 | 129 | 'Symfony\\Component\\EventDispatcher\\' => |
130 | - array ( |
|
130 | + array( |
|
131 | 131 | 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', |
132 | 132 | ), |
133 | 133 | 'Symfony\\Component\\Console\\' => |
134 | - array ( |
|
134 | + array( |
|
135 | 135 | 0 => __DIR__ . '/..' . '/symfony/console', |
136 | 136 | ), |
137 | 137 | 'Psr\\Log\\' => |
138 | - array ( |
|
138 | + array( |
|
139 | 139 | 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', |
140 | 140 | ), |
141 | 141 | 'Psr\\EventDispatcher\\' => |
142 | - array ( |
|
142 | + array( |
|
143 | 143 | 0 => __DIR__ . '/..' . '/psr/event-dispatcher/src', |
144 | 144 | ), |
145 | 145 | 'Psr\\Container\\' => |
146 | - array ( |
|
146 | + array( |
|
147 | 147 | 0 => __DIR__ . '/..' . '/psr/container/src', |
148 | 148 | ), |
149 | 149 | 'Psr\\Cache\\' => |
150 | - array ( |
|
150 | + array( |
|
151 | 151 | 0 => __DIR__ . '/..' . '/psr/cache/src', |
152 | 152 | ), |
153 | 153 | 'PhpCsFixer\\' => |
154 | - array ( |
|
154 | + array( |
|
155 | 155 | 0 => __DIR__ . '/..' . '/friendsofphp/php-cs-fixer/src', |
156 | 156 | ), |
157 | 157 | 'Doctrine\\Common\\Lexer\\' => |
158 | - array ( |
|
158 | + array( |
|
159 | 159 | 0 => __DIR__ . '/..' . '/doctrine/lexer/lib/Doctrine/Common/Lexer', |
160 | 160 | ), |
161 | 161 | 'Doctrine\\Common\\Annotations\\' => |
162 | - array ( |
|
162 | + array( |
|
163 | 163 | 0 => __DIR__ . '/..' . '/doctrine/annotations/lib/Doctrine/Common/Annotations', |
164 | 164 | ), |
165 | 165 | 'Composer\\XdebugHandler\\' => |
166 | - array ( |
|
166 | + array( |
|
167 | 167 | 0 => __DIR__ . '/..' . '/composer/xdebug-handler/src', |
168 | 168 | ), |
169 | 169 | 'Composer\\Semver\\' => |
170 | - array ( |
|
170 | + array( |
|
171 | 171 | 0 => __DIR__ . '/..' . '/composer/semver/src', |
172 | 172 | ), |
173 | 173 | ); |
174 | 174 | |
175 | - public static $classMap = array ( |
|
175 | + public static $classMap = array( |
|
176 | 176 | 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', |
177 | 177 | 'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php', |
178 | 178 | 'JsonException' => __DIR__ . '/..' . '/symfony/polyfill-php73/Resources/stubs/JsonException.php', |
@@ -201,7 +201,7 @@ discard block |
||
201 | 201 | |
202 | 202 | public static function getInitializer(ClassLoader $loader) |
203 | 203 | { |
204 | - return \Closure::bind(function () use ($loader) { |
|
204 | + return \Closure::bind(function() use ($loader) { |
|
205 | 205 | $loader->prefixLengthsPsr4 = ComposerStaticInita88218e7a01457073015c9e64d4100d7::$prefixLengthsPsr4; |
206 | 206 | $loader->prefixDirsPsr4 = ComposerStaticInita88218e7a01457073015c9e64d4100d7::$prefixDirsPsr4; |
207 | 207 | $loader->classMap = ComposerStaticInita88218e7a01457073015c9e64d4100d7::$classMap; |
@@ -111,13 +111,13 @@ discard block |
||
111 | 111 | if (!$prefix) { |
112 | 112 | if ($prepend) { |
113 | 113 | $this->fallbackDirsPsr0 = array_merge( |
114 | - (array) $paths, |
|
114 | + (array)$paths, |
|
115 | 115 | $this->fallbackDirsPsr0 |
116 | 116 | ); |
117 | 117 | } else { |
118 | 118 | $this->fallbackDirsPsr0 = array_merge( |
119 | 119 | $this->fallbackDirsPsr0, |
120 | - (array) $paths |
|
120 | + (array)$paths |
|
121 | 121 | ); |
122 | 122 | } |
123 | 123 | |
@@ -126,19 +126,19 @@ discard block |
||
126 | 126 | |
127 | 127 | $first = $prefix[0]; |
128 | 128 | if (!isset($this->prefixesPsr0[$first][$prefix])) { |
129 | - $this->prefixesPsr0[$first][$prefix] = (array) $paths; |
|
129 | + $this->prefixesPsr0[$first][$prefix] = (array)$paths; |
|
130 | 130 | |
131 | 131 | return; |
132 | 132 | } |
133 | 133 | if ($prepend) { |
134 | 134 | $this->prefixesPsr0[$first][$prefix] = array_merge( |
135 | - (array) $paths, |
|
135 | + (array)$paths, |
|
136 | 136 | $this->prefixesPsr0[$first][$prefix] |
137 | 137 | ); |
138 | 138 | } else { |
139 | 139 | $this->prefixesPsr0[$first][$prefix] = array_merge( |
140 | 140 | $this->prefixesPsr0[$first][$prefix], |
141 | - (array) $paths |
|
141 | + (array)$paths |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | } |
@@ -159,13 +159,13 @@ discard block |
||
159 | 159 | // Register directories for the root namespace. |
160 | 160 | if ($prepend) { |
161 | 161 | $this->fallbackDirsPsr4 = array_merge( |
162 | - (array) $paths, |
|
162 | + (array)$paths, |
|
163 | 163 | $this->fallbackDirsPsr4 |
164 | 164 | ); |
165 | 165 | } else { |
166 | 166 | $this->fallbackDirsPsr4 = array_merge( |
167 | 167 | $this->fallbackDirsPsr4, |
168 | - (array) $paths |
|
168 | + (array)$paths |
|
169 | 169 | ); |
170 | 170 | } |
171 | 171 | } elseif (!isset($this->prefixDirsPsr4[$prefix])) { |
@@ -175,18 +175,18 @@ discard block |
||
175 | 175 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
176 | 176 | } |
177 | 177 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
178 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
178 | + $this->prefixDirsPsr4[$prefix] = (array)$paths; |
|
179 | 179 | } elseif ($prepend) { |
180 | 180 | // Prepend directories for an already registered namespace. |
181 | 181 | $this->prefixDirsPsr4[$prefix] = array_merge( |
182 | - (array) $paths, |
|
182 | + (array)$paths, |
|
183 | 183 | $this->prefixDirsPsr4[$prefix] |
184 | 184 | ); |
185 | 185 | } else { |
186 | 186 | // Append directories for an already registered namespace. |
187 | 187 | $this->prefixDirsPsr4[$prefix] = array_merge( |
188 | 188 | $this->prefixDirsPsr4[$prefix], |
189 | - (array) $paths |
|
189 | + (array)$paths |
|
190 | 190 | ); |
191 | 191 | } |
192 | 192 | } |
@@ -201,9 +201,9 @@ discard block |
||
201 | 201 | public function set($prefix, $paths) |
202 | 202 | { |
203 | 203 | if (!$prefix) { |
204 | - $this->fallbackDirsPsr0 = (array) $paths; |
|
204 | + $this->fallbackDirsPsr0 = (array)$paths; |
|
205 | 205 | } else { |
206 | - $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; |
|
206 | + $this->prefixesPsr0[$prefix[0]][$prefix] = (array)$paths; |
|
207 | 207 | } |
208 | 208 | } |
209 | 209 | |
@@ -219,14 +219,14 @@ discard block |
||
219 | 219 | public function setPsr4($prefix, $paths) |
220 | 220 | { |
221 | 221 | if (!$prefix) { |
222 | - $this->fallbackDirsPsr4 = (array) $paths; |
|
222 | + $this->fallbackDirsPsr4 = (array)$paths; |
|
223 | 223 | } else { |
224 | 224 | $length = strlen($prefix); |
225 | 225 | if ('\\' !== $prefix[$length - 1]) { |
226 | 226 | throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); |
227 | 227 | } |
228 | 228 | $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; |
229 | - $this->prefixDirsPsr4[$prefix] = (array) $paths; |
|
229 | + $this->prefixDirsPsr4[$prefix] = (array)$paths; |
|
230 | 230 | } |
231 | 231 | } |
232 | 232 | |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | return false; |
343 | 343 | } |
344 | 344 | if (null !== $this->apcuPrefix) { |
345 | - $file = apcu_fetch($this->apcuPrefix.$class, $hit); |
|
345 | + $file = apcu_fetch($this->apcuPrefix . $class, $hit); |
|
346 | 346 | if ($hit) { |
347 | 347 | return $file; |
348 | 348 | } |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | } |
357 | 357 | |
358 | 358 | if (null !== $this->apcuPrefix) { |
359 | - apcu_add($this->apcuPrefix.$class, $file); |
|
359 | + apcu_add($this->apcuPrefix . $class, $file); |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | if (false === $file) { |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public static function satisfiedBy(array $versions, $constraints) |
54 | 54 | { |
55 | - $versions = array_filter($versions, function ($version) use ($constraints) { |
|
55 | + $versions = array_filter($versions, function($version) use ($constraints) { |
|
56 | 56 | return Semver::satisfies($version, $constraints); |
57 | 57 | }); |
58 | 58 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | $normalized[] = array($normalizedVersion, $key); |
107 | 107 | } |
108 | 108 | |
109 | - usort($normalized, function (array $left, array $right) use ($direction) { |
|
109 | + usort($normalized, function(array $left, array $right) use ($direction) { |
|
110 | 110 | if ($left[0] === $right[0]) { |
111 | 111 | return 0; |
112 | 112 | } |
@@ -52,16 +52,16 @@ |
||
52 | 52 | public static function match(ConstraintInterface $constraint, $operator, $version) |
53 | 53 | { |
54 | 54 | if (self::$enabled === null) { |
55 | - self::$enabled = !\in_array('eval', explode(',', (string) ini_get('disable_functions')), true); |
|
55 | + self::$enabled = !\in_array('eval', explode(',', (string)ini_get('disable_functions')), true); |
|
56 | 56 | } |
57 | 57 | if (!self::$enabled) { |
58 | 58 | return $constraint->matches(new Constraint(self::$transOpInt[$operator], $version)); |
59 | 59 | } |
60 | 60 | |
61 | - $cacheKey = $operator.$constraint; |
|
61 | + $cacheKey = $operator . $constraint; |
|
62 | 62 | if (!isset(self::$compiledCheckerCache[$cacheKey])) { |
63 | 63 | $code = $constraint->compile($operator); |
64 | - self::$compiledCheckerCache[$cacheKey] = $function = eval('return function($v, $b){return '.$code.';};'); |
|
64 | + self::$compiledCheckerCache[$cacheKey] = $function = eval('return function($v, $b){return ' . $code . ';};'); |
|
65 | 65 | } else { |
66 | 66 | $function = self::$compiledCheckerCache[$cacheKey]; |
67 | 67 | } |