source/Spiral/ORM/Schemas/RelationBuilder.php
private function matchBinded(string $target, SchemaInterface $schema): bool
    {
        if ($schema->getRole() == $target) {
            return true;
        }

        if (interface_exists($target) && is_a($schema->getClass(), $target, true)) {
            //Match by interface
            return true;
        }

        return false;
    }
private function matchBinded(string $target, SchemaInterface $schema): bool
    {
        if ($schema->getRole() == $target) {
            return true;
        }

        if (interface_exists($target) && is_a($schema->getClass(), $target, true)) {
            //Match by interface
            return true;
        }

        return false;
    }
private function matchBinded ( string $ target , SchemaInterface $ schema ) : bool { if ( $ schema -> getRole ( ) == $ target ) { return true ; } if ( interface_exists ( $ target ) && is_a ( $ schema -> getClass ( ) , $ target , true ) ) { //Match by interface return true ; } return false ; }
Check if schema matches relation target.

@param string                              $target
@param \Spiral\ORM\Schemas\SchemaInterface $schema

@return bool
Check if schema matches relation target .