<commit_before><?php namespace Arcanedev\Head\Entities;

use Arcanedev\Markup\Markup;

abstract class AbstractMeta
{
    /* ------------------------------------------------------------------------------------------------
     |  Properties
     | ------------------------------------------------------------------------------------------------
     */

    /* ------------------------------------------------------------------------------------------------
     |  Main Functions
     | ------------------------------------------------------------------------------------------------
     */
    /**
     * @return string
     */
    abstract public function render();

    /**
     * @param string $name
     * @param string $content
     *
     * @return string
     */
    protected function renderMetaTag($name, $content)
    {
        return ! $this->isEmpty()
            ? Markup::meta('name', $name, $content)->render()
            : '';
    }

    /* ------------------------------------------------------------------------------------------------
     |  Check Function
     | ------------------------------------------------------------------------------------------------
     */
    /**
     * @return bool<commit_msg>Upgrading Markup generator<commit_after><?php namespace Arcanedev\Head\Entities;

use Arcanedev\Markup\Markup;

abstract class AbstractMeta
{
    /* ------------------------------------------------------------------------------------------------
     |  Properties
     | ------------------------------------------------------------------------------------------------
     */

    /* ------------------------------------------------------------------------------------------------
     |  Main Functions
     | ------------------------------------------------------------------------------------------------
     */
    /**
     * @return string
     */
    abstract public function render();

    /**
     * @param  string $name
     * @param  string $content
     * @param  array  $attributes
     *
     * @return string
     */
    protected function renderMetaTag($name, $content, array $attributes = [])
    {
        return ! $this->isEmpty()
            ? Markup::meta('name', $name, $content, $attributes)->render()
            : '';
    }

    /* ------------------------------------------------------------------------------------------------
     |  Check Function
     | ------------------------------------------------------------------------------------------------
     */
    /**
     * @return bool
{'fraction_non_alphanumeric': 0.5274725274725275, 'fraction_numerical': 0.0, 'mean_word_length': 0.5145573380867499, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4912914', 'n_tokens_mistral': 435, 'n_tokens_neox': 430, 'n_words': 83}