<commit_before><commit_msg>Adicionado regra de validação para Float<commit_after><?php

namespace Validator\Rules;
use Validator\Exception\ValidationException;

/**
 * Class Float
 * @author  <NAME> <<EMAIL>>
 * @package Validator\Rules
 */
class Float implements RuleInterface
{
    private $data;


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

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

    public function execute()
    {
        if(!is_float($this->getData())) {
            throw new ValidationException("O nmero informado no  do tipo decimal.");
        }
    }
}
{'fraction_non_alphanumeric': 0.1271186440677966, 'fraction_numerical': 0.0, 'mean_word_length': 2.360189573459716, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3687070', 'n_tokens_mistral': 213, 'n_tokens_neox': 209, 'n_words': 51}