@@ -18,8 +18,7 @@ |
||
18 | 18 | |
19 | 19 | if ($flags & self::ASSUME_SORTED) { |
20 | 20 | $this->method = \Closure::fromCallable([$this, 'filterAssumeSorted']); |
21 | - } |
|
22 | - else { |
|
21 | + } else { |
|
23 | 22 | $this->method = \Closure::fromCallable([$this, 'filterAssumeUnsorted']); |
24 | 23 | } |
25 | 24 | } |
@@ -23,14 +23,12 @@ |
||
23 | 23 | if (is_numeric($this->currentKey) && intval($this->currentKey) >= $this->idx) { |
24 | 24 | $this->idx = intval($this->currentKey) + 1; |
25 | 25 | } |
26 | - } |
|
27 | - else { |
|
26 | + } else { |
|
28 | 27 | $this->currentKey = $this->idx++; |
29 | 28 | $this->currentValue = $result; |
30 | 29 | } |
31 | 30 | |
32 | - } |
|
33 | - else { |
|
31 | + } else { |
|
34 | 32 | $this->currentKey = null; |
35 | 33 | $this->currentValue = null; |
36 | 34 | } |
@@ -115,15 +115,12 @@ |
||
115 | 115 | if ($this->persist == self::PERSIST || $this->persist == self::PERSIST_UNCHANGED) { |
116 | 116 | if ($this->persist == self::PERSIST_UNCHANGED || !$this->doCompare()) { |
117 | 117 | $this->doPersist(); |
118 | - } |
|
119 | - else { |
|
118 | + } else { |
|
120 | 119 | $this->doDiscard(); |
121 | 120 | } |
122 | - } |
|
123 | - elseif ($this->persist & self::DISCARD) { |
|
121 | + } elseif ($this->persist & self::DISCARD) { |
|
124 | 122 | $this->doDiscard(); |
125 | - } |
|
126 | - else { |
|
123 | + } else { |
|
127 | 124 | // @codeCoverageIgnoreStart |
128 | 125 | trigger_error("Temp file left on device: " . $this->getRealPath(), E_USER_WARNING); |
129 | 126 | // @codeCoverageIgnoreEnd |
@@ -62,15 +62,13 @@ |
||
62 | 62 | $fileInfo = $current->getFileInfo(GlobIteratorFileInfo::class); |
63 | 63 | if ($this->flags & \FilesystemIterator::CURRENT_AS_PATHNAME) { |
64 | 64 | $current = $fileInfo->getPathname(); |
65 | - } |
|
66 | - else { |
|
65 | + } else { |
|
67 | 66 | $current = $fileInfo; |
68 | 67 | } |
69 | 68 | |
70 | 69 | if ($this->flags & \FilesystemIterator::KEY_AS_FILENAME) { |
71 | 70 | $key = $fileInfo->getFilename(); |
72 | - } |
|
73 | - else { |
|
71 | + } else { |
|
74 | 72 | $key = $fileInfo->getPathname(); |
75 | 73 | } |
76 | 74 | return preg_match($regexPattern, $fileInfo->getPathname()); |
@@ -96,8 +96,7 @@ |
||
96 | 96 | $value = $value instanceof \Traversable ? self::iterator_to_array_deep($value, $use_keys) : $value; |
97 | 97 | if ($use_keys) { |
98 | 98 | $result[$key] = $value; |
99 | - } |
|
100 | - else { |
|
99 | + } else { |
|
101 | 100 | $result[] = $value; |
102 | 101 | } |
103 | 102 | } |
@@ -20,8 +20,7 @@ |
||
20 | 20 | if (!($this->flags & self::CACHE_COUNT) || !isset($this->count)) { |
21 | 21 | if ($this->getInnerIterator() instanceof \Countable) { |
22 | 22 | $this->count = intval($this->getInnerIterator()->count()); |
23 | - } |
|
24 | - else { |
|
23 | + } else { |
|
25 | 24 | $this->count = 0; |
26 | 25 | $this->rewind(); |
27 | 26 | while ($this->valid()) { |