original_string: protected function orderByDependencies(array $dependencies): array
      {
          $ordered = [];
          $available = array_keys($dependencies);
  
          while (0 !== \count($dependencies)) {
              $success = $this->doResolve($dependencies, $ordered, $available);
  
              if (false === $success) {
                  throw new UnresolvableDependenciesException(
                      "The dependencies order could not be resolved.\n".print_r($dependencies, true)
                  );
              }
          }
  
          return $ordered;
      }
code: protected function orderByDependencies(array $dependencies): array
      {
          $ordered = [];
          $available = array_keys($dependencies);
  
          while (0 !== \count($dependencies)) {
              $success = $this->doResolve($dependencies, $ordered, $available);
  
              if (false === $success) {
                  throw new UnresolvableDependenciesException(
                      "The dependencies order could not be resolved.\n".print_r($dependencies, true)
                  );
              }
          }
  
          return $ordered;
      }
code_tokens: protected function orderByDependencies ( array $ dependencies ) : array { $ ordered = [ ] ; $ available = array_keys ( $ dependencies ) ; while ( 0 !== \ count ( $ dependencies ) ) { $ success = $ this -> doResolve ( $ dependencies , $ ordered , $ available ) ; if ( false === $ success ) { throw new UnresolvableDependenciesException ( "The dependencies order could not be resolved.\n" . print_r ( $ dependencies , true ) ) ; } } return $ ordered ; }
docstring: Returns a list of array keys ordered by their dependencies.
  
  @throws UnresolvableDependenciesException
  
  @return string[]
docstring_tokens: Returns a list of array keys ordered by their dependencies .