<commit_before><?php

namespace Podlove\Modules\Shownotes\Template;

use Podlove\Template\Wrapper;

/**
 * Shownotes entry Template Wrapper
 *
 * @templatetag entry
 */
class Entry extends Wrapper
{
    private $entry;

    public function __construct($entry)
    {
        $this->entry = $entry;
    }

    protected function getExtraFilterArgs()
    {
        return array($this->entry);
    }

    // /////////
    // Accessors
    // /////////

    /**
     * Title
     *
     * @accessor
     */
    public function title()
    {
        return $this->entry->title;
    }

    /**
     * Description
     *
     * @accessor
     */
    public function description()
    {
        return $this->entry->description;
    }

    /**
     * Canonical URL
     *
     * Defaults to `original_url` if no canonical URL is available.
     *
     * @accessor
     */
    public function url()
    {
        return $this->entry->affiliate_url
            ?? $this->entry->url
            ?? $this->entry->original_url;
    }

    /**
     * Does this entry have an affiliate URL?
     *
     * @accessor
     */
    public function has_affiliate_url()
    {
        return (bool) $this->entry->affiliate_url;
    }

    /**
     * User provided URL
     *
     * @accessor
     */
    public function original_url()
    {
        return $this->entry->original_url;
    }

    /**
     * Website name
     *
     * @accessor
     */
    public function site_name()
    {
        return $this->entry->site_name;
    }

    /**
     * Website URL
     *
     * Example: The site url of https://example.com/page?param=42 is https://example.com.
     *
     * @accessor
     */
    public function site_url()
    {
        return $this->entry->site_url;
    }

    /**
     * Icon URL
     *
     * @accessor
     */
    public function icon()
    {
        return $this->entry->icon;
    }

    /**
     * Type
     *
     * Either "text" or "link".
     *
     * @accessor
     */
    public function type()
    {
        return $this->entry->type;
    }

    /**
     * Position
     *
     * Float value used for sorting.
     *
     * @accessor
     */
    public function position()
    {
        return $this->entry->position;
    }
}<commit_msg>template api: remove entry.position<commit_after><?php

namespace Podlove\Modules\Shownotes\Template;

use Podlove\Template\Wrapper;

/**
 * Shownotes entry Template Wrapper
 *
 * @templatetag entry
 */
class Entry extends Wrapper
{
    private $entry;

    public function __construct($entry)
    {
        $this->entry = $entry;
    }

    protected function getExtraFilterArgs()
    {
        return array($this->entry);
    }

    // /////////
    // Accessors
    // /////////

    /**
     * Title
     *
     * @accessor
     */
    public function title()
    {
        return $this->entry->title;
    }

    /**
     * Description
     *
     * @accessor
     */
    public function description()
    {
        return $this->entry->description;
    }

    /**
     * Canonical URL
     *
     * Defaults to `original_url` if no canonical URL is available.
     *
     * @accessor
     */
    public function url()
    {
        return $this->entry->affiliate_url
            ?? $this->entry->url
            ?? $this->entry->original_url;
    }

    /**
     * Does this entry have an affiliate URL?
     *
     * @accessor
     */
    public function has_affiliate_url()
    {
        return (bool) $this->entry->affiliate_url;
    }

    /**
     * User provided URL
     *
     * @accessor
     */
    public function original_url()
    {
        return $this->entry->original_url;
    }

    /**
     * Website name
     *
     * @accessor
     */
    public function site_name()
    {
        return $this->entry->site_name;
    }

    /**
     * Website URL
     *
     * Example: The site url of https://example.com/page?param=42 is https://example.com.
     *
     * @accessor
     */
    public function site_url()
    {
        return $this->entry->site_url;
    }

    /**
     * Icon URL
     *
     * @accessor
     */
    public function icon()
    {
        return $this->entry->icon;
    }

    /**
     * Type
     *
     * Either "text" or "link".
     *
     * @accessor
     */
    public function type()
    {
        return $this->entry->type;
    }
}
{'fraction_non_alphanumeric': 0.13734104046242773, 'fraction_numerical': 0.0009248554913294797, 'mean_word_length': 1.500578034682081, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 53, 'https://': 4, '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': '963100', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1336, 'n_words': 269}