/** * @param $inheritance * @return array|LessDefinition[] */ private function collectInheritanceLess($inheritance) { $definitions = []; //use array_reverse to compile the bare themes first. foreach (array_reverse($inheritance) as $shopTemplate) { $definition = new LessDefinition(); $definition->setImportDirectory($this->pathResolver->getPublicDirectory($shopTemplate)); $definition->setFiles([$this->pathResolver->getThemeLessFile($shopTemplate)]); $definitions[] = $definition; } return $definitions; }