Completed
Push — develop ( 316159...00443b )
by Zack
20:22
created
vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  *
20 20
  * @author Victor Berchet <[email protected]>
21 21
  */
22
-class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator
23
-{
22
+class RecursiveDirectoryIterator extends \RecursiveDirectoryIterator {
24 23
     /**
25 24
      * @var bool
26 25
      */
@@ -39,8 +38,7 @@  discard block
 block discarded – undo
39 38
     /**
40 39
      * @throws \RuntimeException
41 40
      */
42
-    public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false)
43
-    {
41
+    public function __construct(string $path, int $flags, bool $ignoreUnreadableDirs = false) {
44 42
         if ($flags & (self::CURRENT_AS_PATHNAME | self::CURRENT_AS_SELF)) {
45 43
             throw new \RuntimeException('This iterator only support returning current as fileinfo.');
46 44
         }
@@ -59,8 +57,7 @@  discard block
 block discarded – undo
59 57
      * @return SplFileInfo File information
60 58
      */
61 59
     #[\ReturnTypeWillChange]
62
-    public function current()
63
-    {
60
+    public function current() {
64 61
         // the logic here avoids redoing the same work in all iterations
65 62
 
66 63
         if (null === $subPathname = $this->subPath) {
@@ -84,8 +81,7 @@  discard block
 block discarded – undo
84 81
      * @throws AccessDeniedException
85 82
      */
86 83
     #[\ReturnTypeWillChange]
87
-    public function getChildren()
88
-    {
84
+    public function getChildren() {
89 85
         try {
90 86
             $children = parent::getChildren();
91 87
 
@@ -115,8 +111,7 @@  discard block
 block discarded – undo
115 111
      * @return void
116 112
      */
117 113
     #[\ReturnTypeWillChange]
118
-    public function rewind()
119
-    {
114
+    public function rewind() {
120 115
         if (false === $this->isRewindable()) {
121 116
             return;
122 117
         }
@@ -129,8 +124,7 @@  discard block
 block discarded – undo
129 124
      *
130 125
      * @return bool true when the stream is rewindable, false otherwise
131 126
      */
132
-    public function isRewindable()
133
-    {
127
+    public function isRewindable() {
134 128
         if (null !== $this->rewindable) {
135 129
             return $this->rewindable;
136 130
         }
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/LazyIterator.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -16,12 +16,10 @@
 block discarded – undo
16 16
  *
17 17
  * @internal
18 18
  */
19
-class LazyIterator implements \IteratorAggregate
20
-{
19
+class LazyIterator implements \IteratorAggregate {
21 20
     private $iteratorFactory;
22 21
 
23
-    public function __construct(callable $iteratorFactory)
24
-    {
22
+    public function __construct(callable $iteratorFactory) {
25 23
         $this->iteratorFactory = $iteratorFactory;
26 24
     }
27 25
 
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/SizeRangeFilterIterator.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,16 +18,14 @@  discard block
 block discarded – undo
18 18
  *
19 19
  * @author Fabien Potencier <[email protected]>
20 20
  */
21
-class SizeRangeFilterIterator extends \FilterIterator
22
-{
21
+class SizeRangeFilterIterator extends \FilterIterator {
23 22
     private $comparators = [];
24 23
 
25 24
     /**
26 25
      * @param \Iterator          $iterator    The Iterator to filter
27 26
      * @param NumberComparator[] $comparators An array of NumberComparator instances
28 27
      */
29
-    public function __construct(\Iterator $iterator, array $comparators)
30
-    {
28
+    public function __construct(\Iterator $iterator, array $comparators) {
31 29
         $this->comparators = $comparators;
32 30
 
33 31
         parent::__construct($iterator);
@@ -39,8 +37,7 @@  discard block
 block discarded – undo
39 37
      * @return bool true if the value should be kept, false otherwise
40 38
      */
41 39
     #[\ReturnTypeWillChange]
42
-    public function accept()
43
-    {
40
+    public function accept() {
44 41
         $fileinfo = $this->current();
45 42
         if (!$fileinfo->isFile()) {
46 43
             return true;
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/MultiplePcreFilterIterator.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @author Fabien Potencier <[email protected]>
18 18
  */
19
-abstract class MultiplePcreFilterIterator extends \FilterIterator
20
-{
19
+abstract class MultiplePcreFilterIterator extends \FilterIterator {
21 20
     protected $matchRegexps = [];
22 21
     protected $noMatchRegexps = [];
23 22
 
@@ -26,8 +25,7 @@  discard block
 block discarded – undo
26 25
      * @param string[]  $matchPatterns   An array of patterns that need to match
27 26
      * @param string[]  $noMatchPatterns An array of patterns that need to not match
28 27
      */
29
-    public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns)
30
-    {
28
+    public function __construct(\Iterator $iterator, array $matchPatterns, array $noMatchPatterns) {
31 29
         foreach ($matchPatterns as $pattern) {
32 30
             $this->matchRegexps[] = $this->toRegex($pattern);
33 31
         }
@@ -48,8 +46,7 @@  discard block
 block discarded – undo
48 46
      *
49 47
      * @return bool
50 48
      */
51
-    protected function isAccepted(string $string)
52
-    {
49
+    protected function isAccepted(string $string) {
53 50
         // should at least not match one rule to exclude
54 51
         foreach ($this->noMatchRegexps as $regex) {
55 52
             if (preg_match($regex, $string)) {
@@ -77,8 +74,7 @@  discard block
 block discarded – undo
77 74
      *
78 75
      * @return bool
79 76
      */
80
-    protected function isRegex(string $str)
81
-    {
77
+    protected function isRegex(string $str) {
82 78
         if (preg_match('/^(.{3,}?)[imsxuADU]*$/', $str, $m)) {
83 79
             $start = substr($m[1], 0, 1);
84 80
             $end = substr($m[1], -1);
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/PathFilterIterator.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,16 +17,14 @@  discard block
 block discarded – undo
17 17
  * @author Fabien Potencier  <[email protected]>
18 18
  * @author Włodzimierz Gajda <[email protected]>
19 19
  */
20
-class PathFilterIterator extends MultiplePcreFilterIterator
21
-{
20
+class PathFilterIterator extends MultiplePcreFilterIterator {
22 21
     /**
23 22
      * Filters the iterator values.
24 23
      *
25 24
      * @return bool true if the value should be kept, false otherwise
26 25
      */
27 26
     #[\ReturnTypeWillChange]
28
-    public function accept()
29
-    {
27
+    public function accept() {
30 28
         $filename = $this->current()->getRelativePathname();
31 29
 
32 30
         if ('\\' === \DIRECTORY_SEPARATOR) {
@@ -50,8 +48,7 @@  discard block
 block discarded – undo
50 48
      *
51 49
      * @return string regexp corresponding to a given string or regexp
52 50
      */
53
-    protected function toRegex(string $str)
54
-    {
51
+    protected function toRegex(string $str) {
55 52
         return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/';
56 53
     }
57 54
 }
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/FileTypeFilterIterator.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,8 +16,7 @@  discard block
 block discarded – undo
16 16
  *
17 17
  * @author Fabien Potencier <[email protected]>
18 18
  */
19
-class FileTypeFilterIterator extends \FilterIterator
20
-{
19
+class FileTypeFilterIterator extends \FilterIterator {
21 20
     public const ONLY_FILES = 1;
22 21
     public const ONLY_DIRECTORIES = 2;
23 22
 
@@ -27,8 +26,7 @@  discard block
 block discarded – undo
27 26
      * @param \Iterator $iterator The Iterator to filter
28 27
      * @param int       $mode     The mode (self::ONLY_FILES or self::ONLY_DIRECTORIES)
29 28
      */
30
-    public function __construct(\Iterator $iterator, int $mode)
31
-    {
29
+    public function __construct(\Iterator $iterator, int $mode) {
32 30
         $this->mode = $mode;
33 31
 
34 32
         parent::__construct($iterator);
@@ -40,8 +38,7 @@  discard block
 block discarded – undo
40 38
      * @return bool true if the value should be kept, false otherwise
41 39
      */
42 40
     #[\ReturnTypeWillChange]
43
-    public function accept()
44
-    {
41
+    public function accept() {
45 42
         $fileinfo = $this->current();
46 43
         if (self::ONLY_DIRECTORIES === (self::ONLY_DIRECTORIES & $this->mode) && $fileinfo->isFile()) {
47 44
             return false;
Please login to merge, or discard this patch.
vendor/symfony/finder/Iterator/CustomFilterIterator.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@  discard block
 block discarded – undo
19 19
  *
20 20
  * @author Fabien Potencier <[email protected]>
21 21
  */
22
-class CustomFilterIterator extends \FilterIterator
23
-{
22
+class CustomFilterIterator extends \FilterIterator {
24 23
     private $filters = [];
25 24
 
26 25
     /**
@@ -29,8 +28,7 @@  discard block
 block discarded – undo
29 28
      *
30 29
      * @throws \InvalidArgumentException
31 30
      */
32
-    public function __construct(\Iterator $iterator, array $filters)
33
-    {
31
+    public function __construct(\Iterator $iterator, array $filters) {
34 32
         foreach ($filters as $filter) {
35 33
             if (!\is_callable($filter)) {
36 34
                 throw new \InvalidArgumentException('Invalid PHP callback.');
@@ -47,8 +45,7 @@  discard block
 block discarded – undo
47 45
      * @return bool true if the value should be kept, false otherwise
48 46
      */
49 47
     #[\ReturnTypeWillChange]
50
-    public function accept()
51
-    {
48
+    public function accept() {
52 49
         $fileinfo = $this->current();
53 50
 
54 51
         foreach ($this->filters as $filter) {
Please login to merge, or discard this patch.
vendor/symfony/finder/Glob.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -33,15 +33,13 @@
 block discarded – undo
33 33
  * @copyright  2004-2005 Fabien Potencier <[email protected]>
34 34
  * @copyright  2002 Richard Clamp <[email protected]>
35 35
  */
36
-class Glob
37
-{
36
+class Glob {
38 37
     /**
39 38
      * Returns a regexp which is the equivalent of the glob pattern.
40 39
      *
41 40
      * @return string
42 41
      */
43
-    public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#')
44
-    {
42
+    public static function toRegex(string $glob, bool $strictLeadingDot = true, bool $strictWildcardSlash = true, string $delimiter = '#') {
45 43
         $firstByte = true;
46 44
         $escaping = false;
47 45
         $inCurlies = 0;
Please login to merge, or discard this patch.
vendor/symfony/finder/Finder.php 1 patch
Braces   +33 added lines, -66 removed lines patch added patch discarded remove patch
@@ -65,8 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     private static $vcsPatterns = ['.svn', '_svn', 'CVS', '_darcs', '.arch-params', '.monotone', '.bzr', '.git', '.hg'];
67 67
 
68
-    public function __construct()
69
-    {
68
+    public function __construct() {
70 69
         $this->ignore = static::IGNORE_VCS_FILES | static::IGNORE_DOT_FILES;
71 70
     }
72 71
 
@@ -75,8 +74,7 @@  discard block
 block discarded – undo
75 74
      *
76 75
      * @return static
77 76
      */
78
-    public static function create()
79
-    {
77
+    public static function create() {
80 78
         return new static();
81 79
     }
82 80
 
@@ -85,8 +83,7 @@  discard block
 block discarded – undo
85 83
      *
86 84
      * @return $this
87 85
      */
88
-    public function directories()
89
-    {
86
+    public function directories() {
90 87
         $this->mode = Iterator\FileTypeFilterIterator::ONLY_DIRECTORIES;
91 88
 
92 89
         return $this;
@@ -97,8 +94,7 @@  discard block
 block discarded – undo
97 94
      *
98 95
      * @return $this
99 96
      */
100
-    public function files()
101
-    {
97
+    public function files() {
102 98
         $this->mode = Iterator\FileTypeFilterIterator::ONLY_FILES;
103 99
 
104 100
         return $this;
@@ -120,8 +116,7 @@  discard block
 block discarded – undo
120 116
      * @see DepthRangeFilterIterator
121 117
      * @see NumberComparator
122 118
      */
123
-    public function depth($levels)
124
-    {
119
+    public function depth($levels) {
125 120
         foreach ((array) $levels as $level) {
126 121
             $this->depths[] = new Comparator\NumberComparator($level);
127 122
         }
@@ -148,8 +143,7 @@  discard block
 block discarded – undo
148 143
      * @see DateRangeFilterIterator
149 144
      * @see DateComparator
150 145
      */
151
-    public function date($dates)
152
-    {
146
+    public function date($dates) {
153 147
         foreach ((array) $dates as $date) {
154 148
             $this->dates[] = new Comparator\DateComparator($date);
155 149
         }
@@ -173,8 +167,7 @@  discard block
 block discarded – undo
173 167
      *
174 168
      * @see FilenameFilterIterator
175 169
      */
176
-    public function name($patterns)
177
-    {
170
+    public function name($patterns) {
178 171
         $this->names = array_merge($this->names, (array) $patterns);
179 172
 
180 173
         return $this;
@@ -189,8 +182,7 @@  discard block
 block discarded – undo
189 182
      *
190 183
      * @see FilenameFilterIterator
191 184
      */
192
-    public function notName($patterns)
193
-    {
185
+    public function notName($patterns) {
194 186
         $this->notNames = array_merge($this->notNames, (array) $patterns);
195 187
 
196 188
         return $this;
@@ -211,8 +203,7 @@  discard block
 block discarded – undo
211 203
      *
212 204
      * @see FilecontentFilterIterator
213 205
      */
214
-    public function contains($patterns)
215
-    {
206
+    public function contains($patterns) {
216 207
         $this->contains = array_merge($this->contains, (array) $patterns);
217 208
 
218 209
         return $this;
@@ -233,8 +224,7 @@  discard block
 block discarded – undo
233 224
      *
234 225
      * @see FilecontentFilterIterator
235 226
      */
236
-    public function notContains($patterns)
237
-    {
227
+    public function notContains($patterns) {
238 228
         $this->notContains = array_merge($this->notContains, (array) $patterns);
239 229
 
240 230
         return $this;
@@ -257,8 +247,7 @@  discard block
 block discarded – undo
257 247
      *
258 248
      * @see FilenameFilterIterator
259 249
      */
260
-    public function path($patterns)
261
-    {
250
+    public function path($patterns) {
262 251
         $this->paths = array_merge($this->paths, (array) $patterns);
263 252
 
264 253
         return $this;
@@ -281,8 +270,7 @@  discard block
 block discarded – undo
281 270
      *
282 271
      * @see FilenameFilterIterator
283 272
      */
284
-    public function notPath($patterns)
285
-    {
273
+    public function notPath($patterns) {
286 274
         $this->notPaths = array_merge($this->notPaths, (array) $patterns);
287 275
 
288 276
         return $this;
@@ -303,8 +291,7 @@  discard block
 block discarded – undo
303 291
      * @see SizeRangeFilterIterator
304 292
      * @see NumberComparator
305 293
      */
306
-    public function size($sizes)
307
-    {
294
+    public function size($sizes) {
308 295
         foreach ((array) $sizes as $size) {
309 296
             $this->sizes[] = new Comparator\NumberComparator($size);
310 297
         }
@@ -325,8 +312,7 @@  discard block
 block discarded – undo
325 312
      *
326 313
      * @see ExcludeDirectoryFilterIterator
327 314
      */
328
-    public function exclude($dirs)
329
-    {
315
+    public function exclude($dirs) {
330 316
         $this->exclude = array_merge($this->exclude, (array) $dirs);
331 317
 
332 318
         return $this;
@@ -341,8 +327,7 @@  discard block
 block discarded – undo
341 327
      *
342 328
      * @see ExcludeDirectoryFilterIterator
343 329
      */
344
-    public function ignoreDotFiles(bool $ignoreDotFiles)
345
-    {
330
+    public function ignoreDotFiles(bool $ignoreDotFiles) {
346 331
         if ($ignoreDotFiles) {
347 332
             $this->ignore |= static::IGNORE_DOT_FILES;
348 333
         } else {
@@ -361,8 +346,7 @@  discard block
 block discarded – undo
361 346
      *
362 347
      * @see ExcludeDirectoryFilterIterator
363 348
      */
364
-    public function ignoreVCS(bool $ignoreVCS)
365
-    {
349
+    public function ignoreVCS(bool $ignoreVCS) {
366 350
         if ($ignoreVCS) {
367 351
             $this->ignore |= static::IGNORE_VCS_FILES;
368 352
         } else {
@@ -379,8 +363,7 @@  discard block
 block discarded – undo
379 363
      *
380 364
      * @return $this
381 365
      */
382
-    public function ignoreVCSIgnored(bool $ignoreVCSIgnored)
383
-    {
366
+    public function ignoreVCSIgnored(bool $ignoreVCSIgnored) {
384 367
         if ($ignoreVCSIgnored) {
385 368
             $this->ignore |= static::IGNORE_VCS_IGNORED_FILES;
386 369
         } else {
@@ -397,8 +380,7 @@  discard block
 block discarded – undo
397 380
      *
398 381
      * @param string|string[] $pattern VCS patterns to ignore
399 382
      */
400
-    public static function addVCSPattern($pattern)
401
-    {
383
+    public static function addVCSPattern($pattern) {
402 384
         foreach ((array) $pattern as $p) {
403 385
             self::$vcsPatterns[] = $p;
404 386
         }
@@ -417,8 +399,7 @@  discard block
 block discarded – undo
417 399
      *
418 400
      * @see SortableIterator
419 401
      */
420
-    public function sort(\Closure $closure)
421
-    {
402
+    public function sort(\Closure $closure) {
422 403
         $this->sort = $closure;
423 404
 
424 405
         return $this;
@@ -433,8 +414,7 @@  discard block
 block discarded – undo
433 414
      *
434 415
      * @see SortableIterator
435 416
      */
436
-    public function sortByName(bool $useNaturalSort = false)
437
-    {
417
+    public function sortByName(bool $useNaturalSort = false) {
438 418
         $this->sort = $useNaturalSort ? Iterator\SortableIterator::SORT_BY_NAME_NATURAL : Iterator\SortableIterator::SORT_BY_NAME;
439 419
 
440 420
         return $this;
@@ -449,8 +429,7 @@  discard block
 block discarded – undo
449 429
      *
450 430
      * @see SortableIterator
451 431
      */
452
-    public function sortByType()
453
-    {
432
+    public function sortByType() {
454 433
         $this->sort = Iterator\SortableIterator::SORT_BY_TYPE;
455 434
 
456 435
         return $this;
@@ -467,8 +446,7 @@  discard block
 block discarded – undo
467 446
      *
468 447
      * @see SortableIterator
469 448
      */
470
-    public function sortByAccessedTime()
471
-    {
449
+    public function sortByAccessedTime() {
472 450
         $this->sort = Iterator\SortableIterator::SORT_BY_ACCESSED_TIME;
473 451
 
474 452
         return $this;
@@ -479,8 +457,7 @@  discard block
 block discarded – undo
479 457
      *
480 458
      * @return $this
481 459
      */
482
-    public function reverseSorting()
483
-    {
460
+    public function reverseSorting() {
484 461
         $this->reverseSorting = true;
485 462
 
486 463
         return $this;
@@ -499,8 +476,7 @@  discard block
 block discarded – undo
499 476
      *
500 477
      * @see SortableIterator
501 478
      */
502
-    public function sortByChangedTime()
503
-    {
479
+    public function sortByChangedTime() {
504 480
         $this->sort = Iterator\SortableIterator::SORT_BY_CHANGED_TIME;
505 481
 
506 482
         return $this;
@@ -517,8 +493,7 @@  discard block
 block discarded – undo
517 493
      *
518 494
      * @see SortableIterator
519 495
      */
520
-    public function sortByModifiedTime()
521
-    {
496
+    public function sortByModifiedTime() {
522 497
         $this->sort = Iterator\SortableIterator::SORT_BY_MODIFIED_TIME;
523 498
 
524 499
         return $this;
@@ -534,8 +509,7 @@  discard block
 block discarded – undo
534 509
      *
535 510
      * @see CustomFilterIterator
536 511
      */
537
-    public function filter(\Closure $closure)
538
-    {
512
+    public function filter(\Closure $closure) {
539 513
         $this->filters[] = $closure;
540 514
 
541 515
         return $this;
@@ -546,8 +520,7 @@  discard block
 block discarded – undo
546 520
      *
547 521
      * @return $this
548 522
      */
549
-    public function followLinks()
550
-    {
523
+    public function followLinks() {
551 524
         $this->followLinks = true;
552 525
 
553 526
         return $this;
@@ -560,8 +533,7 @@  discard block
 block discarded – undo
560 533
      *
561 534
      * @return $this
562 535
      */
563
-    public function ignoreUnreadableDirs(bool $ignore = true)
564
-    {
536
+    public function ignoreUnreadableDirs(bool $ignore = true) {
565 537
         $this->ignoreUnreadableDirs = $ignore;
566 538
 
567 539
         return $this;
@@ -576,8 +548,7 @@  discard block
 block discarded – undo
576 548
      *
577 549
      * @throws DirectoryNotFoundException if one of the directories does not exist
578 550
      */
579
-    public function in($dirs)
580
-    {
551
+    public function in($dirs) {
581 552
         $resolvedDirs = [];
582 553
 
583 554
         foreach ((array) $dirs as $dir) {
@@ -606,8 +577,7 @@  discard block
 block discarded – undo
606 577
      * @throws \LogicException if the in() method has not been called
607 578
      */
608 579
     #[\ReturnTypeWillChange]
609
-    public function getIterator()
610
-    {
580
+    public function getIterator() {
611 581
         if (0 === \count($this->dirs) && 0 === \count($this->iterators)) {
612 582
             throw new \LogicException('You must call one of in() or append() methods before iterating over a Finder.');
613 583
         }
@@ -649,8 +619,7 @@  discard block
 block discarded – undo
649 619
      *
650 620
      * @throws \InvalidArgumentException when the given argument is not iterable
651 621
      */
652
-    public function append(iterable $iterator)
653
-    {
622
+    public function append(iterable $iterator) {
654 623
         if ($iterator instanceof \IteratorAggregate) {
655 624
             $this->iterators[] = $iterator->getIterator();
656 625
         } elseif ($iterator instanceof \Iterator) {
@@ -674,8 +643,7 @@  discard block
 block discarded – undo
674 643
      *
675 644
      * @return bool
676 645
      */
677
-    public function hasResults()
678
-    {
646
+    public function hasResults() {
679 647
         foreach ($this->getIterator() as $_) {
680 648
             return true;
681 649
         }
@@ -689,8 +657,7 @@  discard block
 block discarded – undo
689 657
      * @return int
690 658
      */
691 659
     #[\ReturnTypeWillChange]
692
-    public function count()
693
-    {
660
+    public function count() {
694 661
         return iterator_count($this->getIterator());
695 662
     }
696 663
 
Please login to merge, or discard this patch.