src/Serializer.php
protected function serializeHasMany(Model $owner, array $models = null, AdapterInterface $adapter)
    {
        if (empty($models)) {
            return $this->serialize(null, $adapter);
        }
        return $this->serializeArray($models, $adapter);
    }
protected function serializeHasMany(Model $owner, array $models = null, AdapterInterface $adapter)
    {
        if (empty($models)) {
            return $this->serialize(null, $adapter);
        }
        return $this->serializeArray($models, $adapter);
    }
protected function serializeHasMany ( Model $ owner , array $ models = null , AdapterInterface $ adapter ) { if ( empty ( $ models ) ) { return $ this -> serialize ( null , $ adapter ) ; } return $ this -> serializeArray ( $ models , $ adapter ) ; }
Serializes a has-many relationship value

@param   Model                   $owner
@param   Model[]|null            $models
@param   AdapterInterface        $adapter
@return  array
Serializes a has - many relationship value