public function apply(callable $function) { if ($this->source !== null) { $this->scheme->walk($this->elements, $function); } else { $this->toOrderedMap()->walk($function); } }
/** * @param string $code * @return string */ private function applyFilters(string $code) : string { $this->filters->apply(function ($filter) use(&$code) { $code = $filter($code); }); return $code; }