protected function getMetadataByName(array $object, $key)
    {
        $method = 'get' . \ucfirst($key);

        if (!\method_exists($this, $method)) {
            throw new \InvalidArgumentException('Could not get meta-data for key: ' . $key);
        }

        $object[$key] = $this->{$method}($object['path']);

        return $object;
    }