Skip to content

Commit

Permalink
More simplification
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiu-cristea committed Jul 17, 2023
1 parent 2618c0e commit 5509743
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/Drush/Commands/DrupalDependenciesDrushCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ protected function buildTree(string $dependency, array $path = []): void
continue;
}

if (!NestedArray::keyExists($this->tree, $path)) {
NestedArray::setValue($this->tree, $path, []);
}

// Save this relation to avoid infinite circular references.
$this->relation[$dependency] = $dependent;

Expand All @@ -216,12 +212,12 @@ protected function buildTree(string $dependency, array $path = []): void
}

/**
* @param array $list
* @param array $dependenciesPerDependent
* @return $this
*/
protected function buildDependents(array $list): static
protected function buildDependents(array $dependenciesPerDependent): static
{
foreach ($list as $dependent => $dependencies) {
foreach ($dependenciesPerDependent as $dependent => $dependencies) {
foreach ($dependencies as $dependency) {
$this->dependents[$dependency][$dependent] = $dependent;
}
Expand Down

0 comments on commit 5509743

Please sign in to comment.