// add source file at the beginning if no other theme is included first
if( $addSourceFile &&( $scriptFiles->count() === 0 || !$this->isInclude($scriptFiles->first()->getFilepath()) ) && $configuration->getStorefrontEntryFilepath() ){ $fileCollection->add(newFile($configuration->getStorefrontEntryFilepath())); } foreach($scriptFilesas$scriptFile){ if(!$this->isInclude($scriptFile->getFilepath()) && $onlySourceFiles){ continue; } $fileCollection->add($scriptFile); }