<commit_before><?php

namespace Localdisk\BBS;

use Illuminate\Support\Manager;
use Localdisk\BBS\Drivers\ShitarabaDriver;
use Localdisk\BBS\Drivers\TwoChanDriver;

/**
 * BbsManager
 *
 * @author localdisk
 */
class BBSManager extends Manager
{

    /**
     * コンストラクタ
     *
     * @param  \Illuminate\Contracts\Foundation\Application
     */
    public function __construct($app)
    {
        parent::__construct($app);
    }

    /**
     * Get a provider instance.
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\AbstractDriver
     */
    public function url($url)
    {
        if (parse_url($url, PHP_URL_HOST) === 'jbbs.shitaraba.net') {
            return $this->createShitarabaDriver($url);
        }

        return $this->createTwoChanProvider($url);
    }

    /**
     * Create Shitaraba Driver
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\ShitarabaDriver
     */
    public function createShitarabaDriver($url)
    {
        return $this->buildProvider(ShitarabaDriver::class, $url);
    }

    /**
     * Create TwoChan Provider
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\TwoChanDriver
     */
    public function createTwoChanProvider($url)
    {
        return $this->buildProvider(TwoChanDriver::class, $url);
    }

    /**
     * Build Provider
     *
     * @param  string $provider
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\AbstractDriver
     */
    public function buildProvider($provider, $url)
    {
        return new $provider($this->client, $url);
    }
<commit_msg>fixed: 修正漏れ<commit_after><?php

namespace Localdisk\BBS;

use Illuminate\Support\Manager;
use Localdisk\BBS\Drivers\ShitarabaDriver;
use Localdisk\BBS\Drivers\TwoChanDriver;

/**
 * BbsManager
 *
 * @author localdisk
 */
class BBSManager extends Manager
{

    /**
     * コンストラクタ
     *
     * @param  \Illuminate\Contracts\Foundation\Application
     */
    public function __construct($app)
    {
        parent::__construct($app);
    }

    /**
     * Get a provider instance.
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\AbstractDriver
     */
    public function url($url)
    {
        if (parse_url($url, PHP_URL_HOST) === 'jbbs.shitaraba.net') {
            return $this->createShitarabaDriver($url);
        }

        return $this->createTwoChanProvider($url);
    }

    /**
     * Create Shitaraba Driver
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\ShitarabaDriver
     */
    public function createShitarabaDriver($url)
    {
        return $this->buildProvider(ShitarabaDriver::class, $url);
    }

    /**
     * Create TwoChan Provider
     *
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\TwoChanDriver
     */
    public function createTwoChanProvider($url)
    {
        return $this->buildProvider(TwoChanDriver::class, $url);
    }

    /**
     * Build Provider
     *
     * @param  string $provider
     * @param  string $url
     *
     * @return \Localdisk\BBS\Drivers\AbstractDriver
     */
    public function buildProvider($provider, $url)
    {
        return new $provider($url);
    }

{'fraction_non_alphanumeric': 0.12496143165689602, 'fraction_numerical': 0.0, 'mean_word_length': 2.2226640159045727, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, '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': '7347385', 'n_tokens_mistral': 1072, 'n_tokens_neox': 1037, 'n_words': 178}