/** * @return ArrayCollection|PlugInterface[] */ public function find() { $plugs = new ArrayCollection(); $finder = new Finder(); /** @var SplFileInfo[] $files */ $files = $finder->files()->name('/^composer\\.json$/')->in($this->directory); foreach ($files as $file) { $dependency = new ComposerFile($file->getPath()); $plug = $dependency->getDataReader()->getExtraPlugClass(); $plug = new $plug($file->getPath(), $dependency); $plugs->add($plug); } return $plugs; }
/** * {@inheritdoc} */ public function getName() { return $this->dependency->getDataReader()->getName(); }