src/Builder/WebBuilder.php
private function setDependencies(array $packages): self
    {
        $dependencies = [];
        foreach ($packages as $package) {
            foreach ($package->getRequires() as $link) {
                $dependencies[$link->getTarget()][$link->getSource()] = $link->getSource();
            }
        }

        $this->dependencies = $dependencies;

        return $this;
    }
private function setDependencies(array $packages): self
    {
        $dependencies = [];
        foreach ($packages as $package) {
            foreach ($package->getRequires() as $link) {
                $dependencies[$link->getTarget()][$link->getSource()] = $link->getSource();
            }
        }

        $this->dependencies = $dependencies;

        return $this;
    }
private function setDependencies ( array $ packages ) : self { $ dependencies = [ ] ; foreach ( $ packages as $ package ) { foreach ( $ package -> getRequires ( ) as $ link ) { $ dependencies [ $ link -> getTarget ( ) ] [ $ link -> getSource ( ) ] = $ link -> getSource ( ) ; } } $ this -> dependencies = $ dependencies ; return $ this ; }
Defines the required packages.

@param PackageInterface[] $packages List of packages to dump

@return $this
Defines the required packages .