@@ -47,12 +47,12 @@ discard block |
||
47 | 47 | /** |
48 | 48 | * @var array|Reasoning[] |
49 | 49 | */ |
50 | - private $requirements = []; |
|
50 | + private $requirements = [ ]; |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * @var array|Reasoning[] |
54 | 54 | */ |
55 | - private $limits = []; |
|
55 | + private $limits = [ ]; |
|
56 | 56 | |
57 | 57 | /** |
58 | 58 | * @var string|null |
@@ -132,9 +132,9 @@ discard block |
||
132 | 132 | $version)); |
133 | 133 | } |
134 | 134 | |
135 | - $versionComponents += [2 => 0]; |
|
135 | + $versionComponents += [ 2 => 0 ]; |
|
136 | 136 | |
137 | - return $versionComponents[0] * 10000 + $versionComponents[1] * 100 + $versionComponents[2]; |
|
137 | + return $versionComponents[ 0 ] * 10000 + $versionComponents[ 1 ] * 100 + $versionComponents[ 2 ]; |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | /** |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $line = -1, |
234 | 234 | $msg = null, |
235 | 235 | $reason = Reason::UNKNOWN, |
236 | - array $data = [] |
|
236 | + array $data = [ ] |
|
237 | 237 | ) { |
238 | 238 | $this->addArbitraryVersionConstraint(self::VERSION_LIMIT_MAX, $version, $line, $msg, $reason, |
239 | 239 | $data); |
@@ -254,7 +254,7 @@ discard block |
||
254 | 254 | * @return $this |
255 | 255 | * @throws \LogicException Thrown if the reason is unknown or does not have a version requirement associated. |
256 | 256 | */ |
257 | - public function addRequirement($reason, $line = -1, $msg = null, array $data = []) |
|
257 | + public function addRequirement($reason, $line = -1, $msg = null, array $data = [ ]) |
|
258 | 258 | { |
259 | 259 | $version = Reason::getVersionFromReason($reason); |
260 | 260 | |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | * @param array $data |
277 | 277 | * @return $this |
278 | 278 | */ |
279 | - public function addLimit($reason, $line = -1, $msg = null, array $data = []) |
|
279 | + public function addLimit($reason, $line = -1, $msg = null, array $data = [ ]) |
|
280 | 280 | { |
281 | 281 | $version = Reason::getVersionFromReason($reason); |
282 | 282 | |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | $line = -1, |
305 | 305 | $msg = null, |
306 | 306 | $reason = Reason::UNKNOWN, |
307 | - array $data = [] |
|
307 | + array $data = [ ] |
|
308 | 308 | ) { |
309 | 309 | $this->addArbitraryVersionConstraint(self::VERSION_LIMIT_MIN, $version, $line, $msg, $reason, |
310 | 310 | $data); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | $line = -1, |
327 | 327 | $msg = null, |
328 | 328 | $reason = Reason::UNKNOWN, |
329 | - array $data = [] |
|
329 | + array $data = [ ] |
|
330 | 330 | ) { |
331 | 331 | if ($this->isSealed()) { |
332 | 332 | throw new \RuntimeException('Impossible to write to already sealed result'); |
@@ -336,9 +336,9 @@ discard block |
||
336 | 336 | $this->count++; |
337 | 337 | |
338 | 338 | if ($type === self::VERSION_LIMIT_MAX) { |
339 | - $this->requirements[ $version ][] = new Reasoning($reason, $line, $this, $version, $msg, $data); |
|
339 | + $this->requirements[ $version ][ ] = new Reasoning($reason, $line, $this, $version, $msg, $data); |
|
340 | 340 | } elseif ($type === self::VERSION_LIMIT_MIN) { |
341 | - $this->limits[ $version ][] = new Reasoning($reason, $line, $this, $version, $msg, $data); |
|
341 | + $this->limits[ $version ][ ] = new Reasoning($reason, $line, $this, $version, $msg, $data); |
|
342 | 342 | } |
343 | 343 | } |
344 | 344 | |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | return $this->requirements[ $version ]; |
381 | 381 | } |
382 | 382 | |
383 | - return []; |
|
383 | + return [ ]; |
|
384 | 384 | } |
385 | 385 | |
386 | 386 | /** |
@@ -393,7 +393,7 @@ discard block |
||
393 | 393 | return $this->limits[ $version ]; |
394 | 394 | } |
395 | 395 | |
396 | - return []; |
|
396 | + return [ ]; |
|
397 | 397 | } |
398 | 398 | |
399 | 399 | /** |
@@ -436,8 +436,8 @@ discard block |
||
436 | 436 | public function getIterator() |
437 | 437 | { |
438 | 438 | $iterator = new \ArrayIterator(); |
439 | - $data = [$this->getRequirements(), $this->getLimits()]; |
|
440 | - array_walk_recursive($data, function ($value) use ($iterator) { |
|
439 | + $data = [ $this->getRequirements(), $this->getLimits() ]; |
|
440 | + array_walk_recursive($data, function($value) use ($iterator) { |
|
441 | 441 | if ($value instanceof Reasoning) { |
442 | 442 | $iterator->append($value); |
443 | 443 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $relPath = array_pad($relPath, $padLength, '..'); |
58 | 58 | break; |
59 | 59 | } else { |
60 | - $relPath[0] = './' . $relPath[0]; |
|
60 | + $relPath[ 0 ] = './' . $relPath[ 0 ]; |
|
61 | 61 | } |
62 | 62 | } |
63 | 63 | } |
@@ -81,11 +81,11 @@ discard block |
||
81 | 81 | return null; |
82 | 82 | } |
83 | 83 | $data = array_values($data); |
84 | - $composedComparator = function ($a, $b) use ($mode, $comparator) { |
|
84 | + $composedComparator = function($a, $b) use ($mode, $comparator) { |
|
85 | 85 | $order = $comparator($a, $b); |
86 | 86 | return $mode === EXTREME_MIN ? -$order : $order; |
87 | 87 | }; |
88 | - $extreme = $data[0]; |
|
88 | + $extreme = $data[ 0 ]; |
|
89 | 89 | foreach ($data as $datum) { |
90 | 90 | if ($composedComparator($extreme, $datum) < 0) { |
91 | 91 | $extreme = $datum; |