src/Plugin.php
protected function iteratePackage(Package $package, $includingDev = false)
    {
        $name = $package->getPrettyName();

        /// prevent infinite loop in case of circular dependencies
        static $processed = [];
        if (isset($processed[$name])) {
            return;
        } else {
            $processed[$name] = 1;
        }

        /// package depth in dependency hierarchy
        static $depth = 0;
        ++$depth;

        $this->iterateDependencies($package);
        if ($includingDev) {
            $this->iterateDependencies($package, true);
        }
        if (!isset($this->orderedList[$name])) {
            $this->orderedList[$name] = $depth;
        }

        --$depth;
    }
protected function iteratePackage(Package $package, $includingDev = false)
    {
        $name = $package->getPrettyName();

        /// prevent infinite loop in case of circular dependencies
        static $processed = [];
        if (isset($processed[$name])) {
            return;
        } else {
            $processed[$name] = 1;
        }

        /// package depth in dependency hierarchy
        static $depth = 0;
        ++$depth;

        $this->iterateDependencies($package);
        if ($includingDev) {
            $this->iterateDependencies($package, true);
        }
        if (!isset($this->orderedList[$name])) {
            $this->orderedList[$name] = $depth;
        }

        --$depth;
    }
protected function iteratePackage ( Package $ package , $ includingDev = false ) { $ name = $ package -> getPrettyName ( ) ; /// prevent infinite loop in case of circular dependencies static $ processed = [ ] ; if ( isset ( $ processed [ $ name ] ) ) { return ; } else { $ processed [ $ name ] = 1 ; } /// package depth in dependency hierarchy static $ depth = 0 ; ++ $ depth ; $ this -> iterateDependencies ( $ package ) ; if ( $ includingDev ) { $ this -> iterateDependencies ( $ package , true ) ; } if ( ! isset ( $ this -> orderedList [ $ name ] ) ) { $ this -> orderedList [ $ name ] = $ depth ; } -- $ depth ; }
Iterates through package dependencies.
@param Package $package to iterate
@param bool $includingDev process development dependencies, defaults to not process
Iterates through package dependencies .