src/Generator/Analyzer/Steps/AnalyzeModels.php
protected function multipleBelongsToRelationsBetweenModels($fromModuleId, $toModuleId)
    {
        $count = 0;

        foreach ($this->context->output['models'][ $fromModuleId ]['relationships']['normal'] as $relationship) {

            if (    $relationship['model'] == $toModuleId
                &&  $relationship['type'] == Generator::RELATIONSHIP_BELONGS_TO
                &&  ! array_get($relationship, 'negative')
            ) {
                $count++;
            }
        }

        return ($count > 1);
    }
protected function multipleBelongsToRelationsBetweenModels($fromModuleId, $toModuleId)
    {
        $count = 0;

        foreach ($this->context->output['models'][ $fromModuleId ]['relationships']['normal'] as $relationship) {

            if (    $relationship['model'] == $toModuleId
                &&  $relationship['type'] == Generator::RELATIONSHIP_BELONGS_TO
                &&  ! array_get($relationship, 'negative')
            ) {
                $count++;
            }
        }

        return ($count > 1);
    }
protected function multipleBelongsToRelationsBetweenModels ( $ fromModuleId , $ toModuleId ) { $ count = 0 ; foreach ( $ this -> context -> output [ 'models' ] [ $ fromModuleId ] [ 'relationships' ] [ 'normal' ] as $ relationship ) { if ( $ relationship [ 'model' ] == $ toModuleId && $ relationship [ 'type' ] == Generator :: RELATIONSHIP_BELONGS_TO && ! array_get ( $ relationship , 'negative' ) ) { $ count ++ ; } } return ( $ count > 1 ) ; }
Returns whether there are multiple relationships from one model to the other

@param int $fromModuleId
@param int $toModuleId
@return bool
Returns whether there are multiple relationships from one model to the other