protected function resolveType(RelationshipAnnotation $annotation): int
    {
        if ($annotation->type === RelationshipAnnotation::TYPE_ONE) {
            return Relationship::TYPE_X_TO_ONE;
        }

        if ($annotation->type === RelationshipAnnotation::TYPE_MANY) {
            return Relationship::TYPE_X_TO_MANY;
        }

        throw new \LogicException(sprintf('Invalid type of relation "%s" defined.', $annotation->type));
    }
protected function resolveType(RelationshipAnnotation $annotation): int
    {
        if ($annotation->type === RelationshipAnnotation::TYPE_ONE) {
            return Relationship::TYPE_X_TO_ONE;
        }

        if ($annotation->type === RelationshipAnnotation::TYPE_MANY) {
            return Relationship::TYPE_X_TO_MANY;
        }

        throw new \LogicException(sprintf('Invalid type of relation "%s" defined.', $annotation->type));
    }
protected function resolveType ( RelationshipAnnotation $ annotation ) : int { if ( $ annotation -> type === RelationshipAnnotation :: TYPE_ONE ) { return Relationship :: TYPE_X_TO_ONE ; } if ( $ annotation -> type === RelationshipAnnotation :: TYPE_MANY ) { return Relationship :: TYPE_X_TO_MANY ; } throw new \ LogicException ( sprintf ( 'Invalid type of relation "%s" defined.' , $ annotation -> type ) ) ; }
Resolve type of relationship

@param  RelationshipAnnotation $annotation
@return int
Resolve type of relationship