src/Shell/SeedShell.php
protected function checkModuleRelations(array $modules) : array
    {
        $modulesWithRelations = [];

        foreach ($modules as $name => $module) {
            $module['relations'] = [];
            foreach ($module as $field) {
                if (empty($field['type'])) {
                    continue;
                }
                if (strpos($field['type'], 'related') !== false) {
                    //get related module
                    $type = $this->getStringEnclosedInParenthesis($field['type']);
                    $module['relations'][] = $type;
                }
            }
            $modulesWithRelations[$name] = $module;
        }

        return $modulesWithRelations;
    }
protected function checkModuleRelations(array $modules) : array
    {
        $modulesWithRelations = [];

        foreach ($modules as $name => $module) {
            $module['relations'] = [];
            foreach ($module as $field) {
                if (empty($field['type'])) {
                    continue;
                }
                if (strpos($field['type'], 'related') !== false) {
                    //get related module
                    $type = $this->getStringEnclosedInParenthesis($field['type']);
                    $module['relations'][] = $type;
                }
            }
            $modulesWithRelations[$name] = $module;
        }

        return $modulesWithRelations;
    }
protected function checkModuleRelations ( array $ modules ) : array { $ modulesWithRelations = [ ] ; foreach ( $ modules as $ name => $ module ) { $ module [ 'relations' ] = [ ] ; foreach ( $ module as $ field ) { if ( empty ( $ field [ 'type' ] ) ) { continue ; } if ( strpos ( $ field [ 'type' ] , 'related' ) !== false ) { //get related module $ type = $ this -> getStringEnclosedInParenthesis ( $ field [ 'type' ] ) ; $ module [ 'relations' ] [ ] = $ type ; } } $ modulesWithRelations [ $ name ] = $ module ; } return $ modulesWithRelations ; }
Check module relations.

@param mixed[] $modules modules
@return mixed[]
Check module relations .