src/Formatter.php
public function getEmbedManyDbValue(EmbeddedPropMetadata $embeddedPropMeta, $embeds = null)
    {
        if (null === $embeds) {
            return;
        }
        if (!is_array($embeds) && !$embeds instanceof \Traversable) {
            throw new \InvalidArgumentException('Unable to traverse the embed collection');
        }

        $created = [];
        foreach ($embeds as $embed) {
            $created[] = $this->createEmbed($embeddedPropMeta, $embed);
        }
        return empty($created) ? null : $created;
    }
public function getEmbedManyDbValue(EmbeddedPropMetadata $embeddedPropMeta, $embeds = null)
    {
        if (null === $embeds) {
            return;
        }
        if (!is_array($embeds) && !$embeds instanceof \Traversable) {
            throw new \InvalidArgumentException('Unable to traverse the embed collection');
        }

        $created = [];
        foreach ($embeds as $embed) {
            $created[] = $this->createEmbed($embeddedPropMeta, $embed);
        }
        return empty($created) ? null : $created;
    }
public function getEmbedManyDbValue ( EmbeddedPropMetadata $ embeddedPropMeta , $ embeds = null ) { if ( null === $ embeds ) { return ; } if ( ! is_array ( $ embeds ) && ! $ embeds instanceof \ Traversable ) { throw new \ InvalidArgumentException ( 'Unable to traverse the embed collection' ) ; } $ created = [ ] ; foreach ( $ embeds as $ embed ) { $ created [ ] = $ this -> createEmbed ( $ embeddedPropMeta , $ embed ) ; } return empty ( $ created ) ? null : $ created ; }
Prepares and formats a has-many embed for proper insertion into the database.

@param   EmbeddedPropMetadata        $embeddedPropMeta
@param   EmbedCollection|array|null  $embeds
@return  mixed
Prepares and formats a has - many embed for proper insertion into the database .