protected function getMetadata($templateFileContent)
    {
        $regex                = '/\@MajoraGenerator\((.+)\)/';
        $templateFileMetadata = array('force_generation' => false);
        if (!preg_match_all($regex, $templateFileContent, $matches, PREG_SET_ORDER)) {
            return $templateFileMetadata;
        }
        foreach ($matches as $match) {
            if (null === $metadata = json_decode($match[1], true)) {
                throw new \InvalidArgumentException(sprintf(
                    'Invalid annotation json data, error %s : %s',
                    json_last_error(),
                    json_last_error_msg()
                ));
            }

            $templateFileMetadata =  array_replace_recursive(
                $templateFileMetadata,
                $metadata
            );
        }

        return $templateFileMetadata;
    }