<commit_before><?php

interface IPost
{
    public function link(): string;
}

/**
 * Class Post
 * The Post Model
 */
class Post extends Volcano implements IPost
{
    public function __construct(
        protected string $filepath = '',
    ) {
    }

    /**
     * Generate a post link.
     * Removes the POSTS directory path and file extension.
     *
     * @return string
     */
    public function link(): string
    {
        $noDirectoryName = explode('/', str_replace($this->getPath('posts'), '', $this->filepath));
        return str_replace('.md', '', str_replace('\\', '/', end($noDirectoryName)));
    }
}<commit_msg>Use namespace and add meta()<commit_after><?php

namespace Volcano\Models;

use Volcano\Volcano;

interface IPost
{
    public function link(): string;
    public function meta(string $type): string;
}

/**
 * Class Post 📧
 * The Post Model
 * @package Volcano\Models
 */
class Post extends Volcano implements IPost
{
    public function __construct(
        public string $filepath = '',
    ) {
    }

    /**
     * Generate a post link.
     * Removes the POSTS directory path and file extension.
     * @return string
     */
    public function link(): string
    {
        $noDirectoryName = explode('/', str_replace($this->getPath('posts'), '', $this->filepath));
        return str_replace('.md', '', str_replace('\\', '/', end($noDirectoryName)));
    }

    /**
     * Get meta data.
     * @param string $type
     * @return string
     */
    public function meta(string $type): string
    {
        return $this->getMeta($type, $this);
    }
}
{'fraction_non_alphanumeric': 0.1451917033312382, 'fraction_numerical': 0.0, 'mean_word_length': 2.6018099547511313, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 8, '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': '1822489', 'n_tokens_mistral': 470, 'n_tokens_neox': 457, 'n_words': 132}