public function getSortedNames()
    {
        $sorted = [];
        $toSort = $this->getDependencies();

        while (count($toSort) > 0) {
            foreach ($toSort as $name => $dependencies) {
                if (!array_diff($dependencies, $sorted)) {
                    $sorted[] = $name;
                    unset($toSort[$name]);
                }
            }
        }

        return $sorted;
    }
public function getSortedNames()
    {
        $sorted = [];
        $toSort = $this->getDependencies();

        while (count($toSort) > 0) {
            foreach ($toSort as $name => $dependencies) {
                if (!array_diff($dependencies, $sorted)) {
                    $sorted[] = $name;
                    unset($toSort[$name]);
                }
            }
        }

        return $sorted;
    }
public function getSortedNames ( ) { $ sorted = [ ] ; $ toSort = $ this -> getDependencies ( ) ; while ( count ( $ toSort ) > 0 ) { foreach ( $ toSort as $ name => $ dependencies ) { if ( ! array_diff ( $ dependencies , $ sorted ) ) { $ sorted [ ] = $ name ; unset ( $ toSort [ $ name ] ) ; } } } return $ sorted ; }
Returns the list of path names sorted by least dependent first.

@return string[]
Returns the list of path names sorted by least dependent first .