src/Entity/MetaDataProviderTrait.php
public function getMetaData($key = null, $default = null)
    {
        if (null === $key) {
            return $this->metaData;
        }

        return $this->hasMetaData($key) ? $this->metaData[$key] : $default;
    }
public function getMetaData($key = null, $default = null)
    {
        if (null === $key) {
            return $this->metaData;
        }

        return $this->hasMetaData($key) ? $this->metaData[$key] : $default;
    }
Get meta data.

Returns the whole meta data array, if no <i>$key</i> is provided.
Returns <i>$default</i>, if there is no meta data for the provided <i>$key</i>.

@param null|string $key
@param null|mixed $default

@return array|mixed|null