ModelCode::isRelationTable PHP Method

isRelationTable() protected method

Their PK has 2 fields, and both of those fields are also FK to other separate tables.
protected isRelationTable ( $table ) : boolean
return boolean true if table matches description of helpter table.
    protected function isRelationTable($table)
    {
        $pk = $table->primaryKey;
        return count($pk) === 2 && isset($table->foreignKeys[$pk[0]]) && isset($table->foreignKeys[$pk[1]]) && $table->foreignKeys[$pk[0]][0] !== $table->foreignKeys[$pk[1]][0];
        // and the foreign keys point different tables
    }