public function isValid(Collection $reports) { foreach ($reports->toArray() as $report) { if ($report->pass === false) { return new ValidatorResult(false, $report->message); } } return new ValidatorResult(true, StringLiteral::fromNative('')); }
public function testToArray() { $array = array(new StringLiteral('one'), new StringLiteral('two'), new Integer(3)); $this->assertEquals($array, $this->collection->toArray()); }