/** * @return array */ public function build() { $dependencyTree = $this->filter->filter($this->dependencyTreeReader->read()); $this->buildMatrixStructure(); foreach ($dependencyTree as $dependency) { $bundle = $dependency[DependencyTree::META_BUNDLE]; $foreignBundle = $dependency[DependencyTree::META_FOREIGN_BUNDLE]; if ($bundle === 'external' || $foreignBundle === 'external' || $bundle === 'Business') { continue; } $info = $this->matrix[$bundle][$foreignBundle]; $info[] = $dependency[DependencyTree::META_CLASS_NAME] . ' => ' . $dependency[DependencyTree::META_FOREIGN_CLASS_NAME]; $this->matrix[$bundle][$foreignBundle] = $info; } return $this->matrix; }
/** * @return \Spryker\Zed\Development\Business\DependencyTree\DependencyFilter\TreeFilter */ protected function createComposerJsonRequireUpdaterTreeFilter() { $treeFilter = new TreeFilter(); $treeFilter->addFilter($this->createDependencyTreeClassNameFilter('/\\Dependency\\\\(.*?)Interface/'))->addFilter($this->createDependencyTreeInvalidForeignBundleFilter()); return $treeFilter; }