Skip to content

Commit db4439c

Browse files
committed
Slightly improve code readability
Signed-off-by: Jack Cherng <[email protected]>
1 parent 682fb39 commit db4439c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Utility/ReverseIterator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
final class ReverseIterator
88
{
9+
const ITERATOR_GET_VALUE = 0;
910
const ITERATOR_GET_KEY = 1 << 0;
1011
const ITERATOR_GET_BOTH = 1 << 1;
1112

@@ -24,7 +25,7 @@ private function __construct()
2425
*
2526
* @return \Generator
2627
*/
27-
public static function fromArray(array $array, int $flags = 0): \Generator
28+
public static function fromArray(array $array, int $flags = self::ITERATOR_GET_VALUE): \Generator
2829
{
2930
// iterate [key => value] pair
3031
if ($flags & self::ITERATOR_GET_BOTH) {

0 commit comments

Comments
 (0)