/**
  * @param TokenReflection\ReflectionClass|TokenReflection\Invalid\ReflectionClass $ref
  */
 private function loadParentClassesAndInterfacesFromClassReflection($ref)
 {
     foreach (array_merge($ref->getParentClasses(), $ref->getInterfaces()) as $parentName => $parentReflection) {
         /** @var TokenReflection\ReflectionClass $parentReflection */
         if ($parentReflection->isInternal()) {
             if (!isset($this->allClasses[self::INTERNAL_CLASSES][$parentName])) {
                 $this->allClasses[self::INTERNAL_CLASSES][$parentName] = $parentReflection;
             }
         } elseif (!$parentReflection->isTokenized()) {
             if (!isset($this->allClasses[self::NONEXISTENT_CLASSES][$parentName])) {
                 $this->allClasses[self::NONEXISTENT_CLASSES][$parentName] = $parentReflection;
             }
         }
     }
 }