protected function addClasses(array $classes, FileDescriptor $fileDescriptor): void
    {
        foreach ($classes as $class) {
            $classDescriptor = $this->getBuilder()->buildDescriptor($class);
            if ($classDescriptor) {
                $classDescriptor->setLocation($fileDescriptor, $class->getLocation()->getLineNumber());
                if (count($classDescriptor->getTags()->get('package', new Collection())) === 0) {
                    $classDescriptor->getTags()->set(
                        'package',
                        $fileDescriptor->getTags()->get('package', new Collection())
                    );
                }

                $fileDescriptor->getClasses()->set(
                    (string) ($classDescriptor->getFullyQualifiedStructuralElementName()),
                    $classDescriptor
                );
            }
        }
    }