Skip to content

Commit c67d404

Browse files
authored
Changed the docblock summary for push()
The summary stated that push() would **push** the values **into the front** of the queue. The php.net docs and wikipedia (linked from the ds-ext blog post) state that values are *pushed onto the back* of the queue and *popped off the front* of the queue. I think it should either: - push values into the queue from the back OR - push values onto the back of the queue I hope my understanding is correct and the explanation makes sense. :S If this is right, I think we should also update the class docblock summary to mention that values are pushed onto the back. A “first in, first out” or “FIFO” collection that pushes new values into the back of the queue but only allows access to the value at the front of the queue and iterates in order from the front, destructively.
1 parent 298cafa commit c67d404

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Queue.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function pop()
106106
}
107107

108108
/**
109-
* Pushes zero or more values into the front of the queue.
109+
* Pushes zero or more values into the back of the queue.
110110
*
111111
* @param mixed ...$values
112112
*

0 commit comments

Comments
 (0)