jocarreira / hamcrest

Automatically exported from code.google.com/p/hamcrest
0 stars 0 forks source link

PHP: BaseDescription::appendValue() passes Iterator to appendValueList() which takes array #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hamcrest_Description::appendValueList() is declared to take an array as its 
final $values parameter, but Hamcrest_BaseDescription::appendValue() will pass 
an Iterator to it.

    elseif (is_array($value) || $value instanceof Iterator)
    {
        $this->appendValueList('[', ', ', ']', $value);
    }

Original issue reported on code.google.com by dharkn...@gmail.com on 19 Jun 2010 at 12:35

GoogleCodeExporter commented 8 years ago
I removed the array type declaration from Description::appendValues() and 
appendValueList() and its implementations in BaseDescription and 
NullDescription.
BaseDescription::appendValue() now passes array, Iterator, and 
IteratorAggregate objects to appendValues(), and these are noted in the doc 
blocks for the affected methods in Description.

Original comment by dharkn...@gmail.com on 13 Jul 2010 at 1:29