<commit_before><?php
namespace Validator\Rules;
use Collections\ArrayList;
use Validator\Exception\ValidationException;

/**
 * Class Sequence
 * @author  <NAME> <<EMAIL>>
 * @package Validator\Rules
 */
class BlackList implements RuleInterface
{
    /**
     * Dado a ser validado
     * @var String
     */
    private $data;

    /**
     * @var ArrayList
     */
    private $blackList;

    public function __construct($blackList)
    {
        $this->setBlackList($blackList);
    }

    /**
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * @param mixed $data
     */
    public function setData($data)
    {
        $this->data = $data;
    }

    /**
     * @return ArrayList
     */
    public function getBlackList()
    {
        return $this->blackList;
    }

    /**
     * @param ArrayList $blackList
     */
    public function setBlackList($blackList)
    {
        $this->blackList = $blackList;
    }

    /**
     * @throws ValidationException
     */
    public function execute()
    {
        if($this->getBlackList()->contains($this->getData()))
            throw new ValidationException("A sequencia {$this->getBlackList()} no  permitida.");
    }

}
<commit_msg>Correção da regra de validação por lista negra.<commit_after><?php
namespace Validator\Rules;
use Collections\ArrayList;
use Validator\Exception\ValidationException;

/**
 * Class Sequence
 * @author  <NAME> <<EMAIL>>
 * @package Validator\Rules
 */
class BlackList implements RuleInterface
{
    /**
     * Dado a ser validado
     * @var String
     */
    private $data;

    /**
     * @var ArrayList
     */
    private $blackList;

    /**
     * @param ArrayList $blackList
     */
    public function __construct(ArrayList $blackList)
    {
        $this->setBlackList($blackList);
    }

    /**
     * @return mixed
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * @param mixed $data
     */
    public function setData($data)
    {
        $this->data = $data;
    }

    /**
     * @return ArrayList
     */
    public function getBlackList()
    {
        return $this->blackList;
    }

    /**
     * @param ArrayList $blackList
     */
    public function setBlackList(ArrayList $blackList)
    {
        $this->blackList = $blackList;
    }

    /**
     * @throws ValidationException
     */
    public function execute()
    {
        if($this->getBlackList()->contains($this->getData()))
            throw new ValidationException("A sequencia {$this->getData()} no  permitida.");
    }

}

{'fraction_non_alphanumeric': 0.13381901840490798, 'fraction_numerical': 0.0, 'mean_word_length': 2.065804935370153, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 27, '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': '649092', 'n_tokens_mistral': 775, 'n_tokens_neox': 763, 'n_words': 166}