<commit_before><?php namespace LaravelSeed\Repositories;

use Illuminate\Database\ConnectionResolverInterface;
use LaravelSeed\Contracts\RepositoryInterface;
use LaravelSeed\Exceptions\SeederException;

class SeederDbRepository implements RepositoryInterface {

    /**
     * @var ConnectionResolverInterface
     */
    private $manager;

    /**
     * @param ConnectionResolverInterface $manager
     */
    public function __construct(ConnectionResolverInterface $manager) {

        $this->manager = $manager;
    }

    /**
     * Return an connection by alias ..
     *
     * @param $alias
     * @return mixed|void
     */
    public function connection($alias = '') {
        return self::getManager()->connection($alias);
    }

    /**
     * Check if seeds table already exists ..
     */
    public function isTableExists() {
        return false;
    }

    /**
     * Migrate seeds table ..
     */
    public function migrateTable() {
        if( self::isTableExists() )
            throw new SeederException('Table already exists!');
    }

    /**
     * Remove seeds table ..
     */
    public function rollBackTable() {
        if(! self::isTableExists())
            return true;
    }

    /**
     * Get last batch number by _ENV
     *
     * @param $env
     */
    public function getLastBatch($env) {

    }

    /**
     * Get next batch number ..
     *
     * @param $env
     */
    public function getNextBatch($env) {
        return self::getLastBatch($env) + 1;
    }

    /**
     * Get all seeds by the env ..
     *
     * @param $env
     */
    public function getSeeds($env) {

    }


    /**
     * Return manager instance ..
     *
     * @return ConnectionResolverInterface
     */
    private function getManager() {
        return $this->manager;
    }

}<commit_msg>adding default table to __construct.<commit_after><?php namespace LaravelSeed\Repositories;

use Illuminate\Database\ConnectionResolverInterface;
use LaravelSeed\Contracts\RepositoryInterface;
use LaravelSeed\Exceptions\SeederException;

class SeederDbRepository implements RepositoryInterface {

    /**
     * @var ConnectionResolverInterface
     */
    private $manager;
    /**
     * @var
     */
    private $table;

    /**
     * @param ConnectionResolverInterface $manager
     */
    public function __construct(ConnectionResolverInterface $manager, $table) {

        $this->manager = $manager;
        $this->table = $table;
    }

    /**
     * Return an connection by alias ..
     *
     * @param $alias
     * @return mixed|void
     */
    public function connection($alias = '') {
        return self::getManager()->connection($alias);
    }

    /**
     * Check if seeds table already exists ..
     */
    public function isTableExists() {
        return $this->connection();
    }

    /**
     * Migrate seeds table ..
     */
    public function migrateTable() {
        if( self::isTableExists() )
            throw new SeederException('Table already exists!');
    }

    /**
     * Remove seeds table ..
     */
    public function rollBackTable() {
        if(! self::isTableExists())
            return true;
    }

    /**
     * Get last batch number by _ENV
     *
     * @param $env
     */
    public function getLastBatch($env) {

    }

    /**
     * Get next batch number ..
     *
     * @param $env
     */
    public function getNextBatch($env) {
        return self::getLastBatch($env) + 1;
    }

    /**
     * Get all seeds by the env ..
     *
     * @param $env
     */
    public function getSeeds($env) {

    }

    /**
     * Get default table .
     *
     * @return mixed
     */
    private function getDefaultTable() {
        return $this->table;
    }

    /**
     * Return manager instance ..
     *
     * @return ConnectionResolverInterface
     */
    private function getManager() {
        return $this->manager;
    }

}
{'fraction_non_alphanumeric': 0.11862669741224699, 'fraction_numerical': 0.0005124263387138099, 'mean_word_length': 1.975609756097561, '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': '3419131', 'n_tokens_mistral': 1095, 'n_tokens_neox': 1065, 'n_words': 256}