src/DoctrineStaticMeta.php
public function getRequiredRelationProperties(): array
    {
        if (null !== $this->requiredRelationProperties) {
            return $this->requiredRelationProperties;
        }
        $traits = $this->reflectionClass->getTraits();
        $return = [];
        foreach ($traits as $traitName => $traitReflection) {
            if (false === \ts\stringContains($traitName, '\\HasRequired')) {
                continue;
            }
            if (false === \ts\stringContains($traitName, '\\Entity\\Relations\\')) {
                continue;
            }

            $property          = $traitReflection->getProperties()[0]->getName();
            $return[$property] = $this->getTypesFromVarComment(
                $property,
                $this->getReflectionHelper()->getTraitProvidingProperty($traitReflection, $property)
            );
        }
        $this->requiredRelationProperties = $return;

        return $return;
    }
public function getRequiredRelationProperties(): array
    {
        if (null !== $this->requiredRelationProperties) {
            return $this->requiredRelationProperties;
        }
        $traits = $this->reflectionClass->getTraits();
        $return = [];
        foreach ($traits as $traitName => $traitReflection) {
            if (false === \ts\stringContains($traitName, '\\HasRequired')) {
                continue;
            }
            if (false === \ts\stringContains($traitName, '\\Entity\\Relations\\')) {
                continue;
            }

            $property          = $traitReflection->getProperties()[0]->getName();
            $return[$property] = $this->getTypesFromVarComment(
                $property,
                $this->getReflectionHelper()->getTraitProvidingProperty($traitReflection, $property)
            );
        }
        $this->requiredRelationProperties = $return;

        return $return;
    }
public function getRequiredRelationProperties ( ) : array { if ( null !== $ this -> requiredRelationProperties ) { return $ this -> requiredRelationProperties ; } $ traits = $ this -> reflectionClass -> getTraits ( ) ; $ return = [ ] ; foreach ( $ traits as $ traitName => $ traitReflection ) { if ( false === \ ts \ stringContains ( $ traitName , '\\HasRequired' ) ) { continue ; } if ( false === \ ts \ stringContains ( $ traitName , '\\Entity\\Relations\\' ) ) { continue ; } $ property = $ traitReflection -> getProperties ( ) [ 0 ] -> getName ( ) ; $ return [ $ property ] = $ this -> getTypesFromVarComment ( $ property , $ this -> getReflectionHelper ( ) -> getTraitProvidingProperty ( $ traitReflection , $ property ) ) ; } $ this -> requiredRelationProperties = $ return ; return $ return ; }
Get an array of required relation properties, keyed by the property name and the value being an array of FQNs
for the declared types

@return array [ propertyName => [...types]]
@throws \ReflectionException
Get an array of required relation properties keyed by the property name and the value being an array of FQNs for the declared types