Make ResultSet iterator current() not return a mixed value #1506
Returning potentially false from the iterator current() means each result set item could be
Returning potentially false from the iterator current() means each result set item could be `false` which makes it impractical to safely use it. When using phpstan, you will get errors like `Cannot call method getId() on bool|Elastica\Result.` when you just iterate over the result set. Also `current()` should not need to check `valid()` again because that is done automatically by php when using foreach. When valid returns false, the loop is ended. So that is part of the Iterator spec. So using current on a non-existing item should not happen unless you misuse the Iterator.