public function getBaseHasTypeTraitFqn(
        string $ownedHasName,
        string $hasType
    ): string {
        $required = \ts\stringContains($hasType, RelationsGenerator::PREFIX_REQUIRED)
            ? RelationsGenerator::PREFIX_REQUIRED
            : '';

        $hasType = \str_replace(RelationsGenerator::PREFIX_REQUIRED, '', $hasType);
        foreach ([
                     RelationsGenerator::INTERNAL_TYPE_MANY_TO_MANY,
                     RelationsGenerator::INTERNAL_TYPE_ONE_TO_ONE,
                 ] as $noStrip) {
            if (\ts\stringContains($hasType, $noStrip)) {
                return 'Has' . $required . $ownedHasName . $hasType;
            }
        }

        foreach ([
                     RelationsGenerator::INTERNAL_TYPE_ONE_TO_MANY,
                     RelationsGenerator::INTERNAL_TYPE_MANY_TO_ONE,
                 ] as $stripAll) {
            if (\ts\stringContains($hasType, $stripAll)) {
                return str_replace(
                    [
                        RelationsGenerator::PREFIX_OWNING,
                        RelationsGenerator::PREFIX_INVERSE,
                    ],
                    '',
                    'Has' . $required . $ownedHasName . $hasType
                );
            }
        }

        return str_replace(
            [
                RelationsGenerator::PREFIX_INVERSE,
            ],
            '',
            'Has' . $required . $ownedHasName . $hasType
        );
    }