source/Spiral/ORM/Schemas/Relations/Traits/MorphedTrait.php
protected function findTargets(SchemaBuilder $builder): \Generator
    {
        foreach ($builder->getSchemas() as $schema) {
            if (!is_a($schema->getClass(), $this->getDefinition()->getTarget(), true)) {
                //Not our targets
                continue;
            }
            yield $schema;
        }
    }
protected function findTargets(SchemaBuilder $builder): \Generator
    {
        foreach ($builder->getSchemas() as $schema) {
            if (!is_a($schema->getClass(), $this->getDefinition()->getTarget(), true)) {
                //Not our targets
                continue;
            }
            yield $schema;
        }
    }
protected function findTargets ( SchemaBuilder $ builder ) : \ Generator { foreach ( $ builder -> getSchemas ( ) as $ schema ) { if ( ! is_a ( $ schema -> getClass ( ) , $ this -> getDefinition ( ) -> getTarget ( ) , true ) ) { //Not our targets continue ; } yield $ schema ; } }
Find all matched schemas.

@param \Spiral\ORM\Schemas\SchemaBuilder $builder

@return \Generator|\Spiral\ORM\Schemas\SchemaInterface[]
Find all matched schemas .