<commit_before><?php namespace Palmabit\Library\Validators;

use Event;
use Illuminate\Support\Facades\App;
use Validator as V;
use Illuminate\Validation\DatabasePresenceVerifier;
use Palmabit\Library\Traits\OverrideConnectionTrait;
use Palmabit\Library\Validators\AbstractValidator as BaseValidator;

class OverrideConnectionValidator extends BaseValidator
{
    use OverrideConnectionTrait;

    /**
     * @override
     * @param $input
     * @return bool
     */
    public function validate($input)
    {
        Event::fire('validating', [$input]);
        $validator = $this->instanceValidator($input);

        if($validator->fails())
        {
            $this->errors = $validator->messages();

            return false;
        }

        return true;
    }
  public function instanceValidator($input)
  {
    $validator = V::make($input, static::$rules);
    // update presence verifier
    $validator->getPresenceVerifier()->setConnection($this->getConnection());
    return $validator;
  }<commit_msg>disabled override conn validator<commit_after><?php namespace Palmabit\Library\Validators;

use Event;
use Illuminate\Support\Facades\App;
use Validator as V;
use Illuminate\Validation\DatabasePresenceVerifier;
use Palmabit\Library\Traits\OverrideConnectionTrait;
use Palmabit\Library\Validators\AbstractValidator as BaseValidator;

class OverrideConnectionValidator extends BaseValidator
{
    use OverrideConnectionTrait;

    /**
     * @override
     * @param $input
     * @return bool
     */
//    public function validate($input)
//    {
//        Event::fire('validating', [$input]);
//        $validator = $this->instanceValidator($input);
//
//        if($validator->fails())
//        {
//            $this->errors = $validator->messages();
//
//            return false;
//        }
//
//        return true;
//    }
//  public function instanceValidator($input)
//  {
//    $validator = V::make($input, static::$rules);
//    // update presence verifier
//    $validator->getPresenceVerifier()->setConnection($this->getConnection());
//    return $validator;
//  }
{'fraction_non_alphanumeric': 0.13556085918854416, 'fraction_numerical': 0.0, 'mean_word_length': 3.062015503875969, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '4554606', 'n_tokens_mistral': 576, 'n_tokens_neox': 585, 'n_words': 115}