/**
  * Gets an ordered array of passed classes including all their dependencies.
  *
  * @param array $classes
  *
  * @return \ReflectionClass[] An array of sorted \ReflectionClass instances (dependencies added if needed)
  *
  * @throws \InvalidArgumentException When a class can't be loaded
  */
 private static function getOrderedClasses(array $classes)
 {
     $map = array();
     self::$seen = array();
     foreach ($classes as $class) {
         try {
             $reflectionClass = new \ReflectionClass($class);
         } catch (\ReflectionException $e) {
             throw new \InvalidArgumentException(sprintf('Unable to load class "%s"', $class));
         }
         $map = array_merge($map, self::getClassHierarchy($reflectionClass));
     }
     return $map;
 }
 /**
  * This method is only useful for testing.
  */
 public static function enableTokenizer($bool)
 {
     self::$useTokenizer = (bool) $bool;
 }