public function visitCollection(CollectionBinding $collection) { $this->writer->write("["); $elements = $collection->getElements(); if ($elements) { $this->writer->indent(); foreach ($elements as $element) { $element->accept($this); $this->writer->writeln(", "); } $this->writer->outdent(); } $this->writer->write("]"); }
public function visitCollection(CollectionBinding $collection) { foreach ($collection->getElements() as $element) { $element->accept($this); } }