8000 fix whitespaces · piowin/zend-stdlib@06646f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06646f5

Browse files
committed
fix whitespaces
1 parent f8a6f77 commit 06646f5

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

src/FastPriorityQueue.php

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -132,31 +132,31 @@ public function extract()
132132
*/
133133
public function remove($datum)
134134
{
135-
$currentIndex = $this->index;
136-
$currentSubIndex = $this->subIndex;
137-
$currentPriority = $this->maxPriority;
138-
135+
$currentIndex = $this->index;
136+
$currentSubIndex = $this->subIndex;
137+
$currentPriority = $this->maxPriority;
138+
139139
$this->rewind();
140140
while ($this->valid()) {
141141
if (current($this->values[$this->maxPriority]) === $datum) {
142142
$index = key($this->values[$this->maxPriority]);
143143
unset($this->values[$this->maxPriority][$index]);
144-
144+
145145
// The `next()` method advances the internal array pointer, so we need to use the `reset()` function,
146146
// otherwise we would lose all elements before the place the pointer points.
147147
reset($this->values[$this->maxPriority]);
148-
148+
149149
$this->index = $currentIndex;
150150
$this->subIndex = $currentSubIndex;
151-
151+
152152
// If the array is empty we need to destroy the unnecessary priority,
153153
// otherwise we would end up with an incorrect value of `$this->count` {@see \Zend\Stdlib\FastPriorityQueue::nextAndRemove()}.
154154
if (empty($this->values[$this->maxPriority])) {
155-
unset($this->values[$this->maxPriority]);
156-
unset($this->priorities[$this->maxPriority]);
157-
if ($this->maxPriority === $currentPriority) {
158-
$this->subIndex = 0;
159-
}
155+
unset($this->values[$this->maxPriority]);
156+
unset($this->priorities[$this->maxPriority]);
157+
if ($this->maxPriority === $currentPriority) {
158+
$this->subIndex = 0;
159+
}
160160
}
161161

162162
$this->maxPriority = empty($this->priorities) ? null : max($this->priorities);
@@ -214,15 +214,15 @@ public function key()
214214
*/
215215
protected function nextAndRemove()
216216
{
217-
$key = key($this->values[$this->maxPriority]);
218-
217+
$key = key($this->values[$this->maxPriority]);
218+
219219
if (false === next($this->values[$this->maxPriority])) {
220220
unset($this->priorities[$this->maxPriority]);
221221
unset($this->values[$this->maxPriority]);
222222
$this->maxPriority = empty($this->priorities) ? null : max($this->priorities);
223223
$this->subIndex = -1;
224224
} else {
225-
unset($this->values[$this->maxPriority][$key]);
225+
unset($this->values[$this->maxPriority][$key]);
226226
}
227227
++$this->index;
228228
++$this->subIndex;

0 commit comments

Comments
 (0)
0