Report the results of a spam detector

@param   string   $name     Name of the detector
@param   boolean  $value    If spam or not
@param   string   $message  Message set by detector
@return  string
504037
protected function mark($name, $value, $message = null)
	{
		$this->report[] = array(
			'service' => $name,
			'is_spam' => $value,
			'message' => $message
		);
	}
981101
public function not_empty($name, $value){
        if($value != NULL){
            return TRUE;
        }else{
            $this->add_message($name, 'empty_file');
            return FALSE;
        }
    }
515496
public function add_rule($name, $value, $rules){
        $this->fieldsState[$name] = array(
			'name'			=> $name,
			'value'			=> $value,
			'rules'			=> explode('|', $rules),
                        'valid'                 => TRUE,
                        'message'               => NULL
        );
    }
557754
private function assertArrayValue($value, $message = null)
    {
        if (!is_array($value)) {
            return $this->failedAssert(sprintf('value is an array, got "%s".', is_object($value) ? get_class($value) : gettype($value)), $message);
        }

        return true;
    }
654811
protected function is_boolean($name, $value){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        if(! is_bool($value)){
            if($value != "0" && $value != "1"){
                $this->add_message($name, 'is_boolean');
                return FALSE;
            }
        }
        return TRUE;
    }
1109477
public static function show($value, $name = null)
    {
        /** lang file */
        $file = __DIR__.'/../../'.DIR_LANGUAGE . LANGUAGE_CODE . DS . "$name.php";

        /** check if is readable */
        if (is_readable($file)) {
            /** require file */
//            $array = include($file);
        } else {
            /** display error */
           echo Exception::langNotLoad();
        }

        if (!empty($array[$value])) {
            return $array[$value];
        } else {
            return $value;
        }
    }
332103
public static function post(String $name = NULL, $value = NULL)
    {
        return self::_method($name, $value, $_POST ,__FUNCTION__);
    }
195993
public void validateFalse(boolean value, String name) {
        validateFalse(value, name, messages.get(Validation.FALSE_KEY.name(), name));
    }
178504
protected function link($name, $value){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        if(! filter_var($value, FILTER_VALIDATE_URL)){
            $this->add_message($name, 'link');
            return FALSE;
        }
        return TRUE;
    }
435025
protected function not_null($name, $value){
        if($value === NULL){
            $this->add_message($name, 'not_null');
            return FALSE;
        }
        return TRUE;
    }
252870
public function logValue($value, $name = null) {
        if (is_null($name)) {
            $name = 'VALUE';
        }
        $this->log('%s => %s', $name,
            $this->_backtrace_formatArgsHelper($value));
    }
140029
protected function ip($name, $value){
        //Si no se completo no se valida
        if(! $this->isComplete($value)){
            return TRUE;
        }
        if(! filter_var($value, FILTER_VALIDATE_IP)){
            $this->add_message($name, 'ip');
            return FALSE;
        }
        return TRUE;
    }
1346258
public function max_size($name, $value, $max){
        if(! $this->not_empty($name, $value)){
            return TRUE;
        }
        $total= 0;
        if($this->isMultiple($value)){
            foreach ($value['size'] as $size) {
                $total+= $size;
            }
        }else{
            $total= $value['size'];
        }
        
        if($total < $max){
            return TRUE;
        }else{
            $this->add_message($name, 'max_size', array('max' => $max));
            return FALSE;
        }
    }
1110139
public function setHeader(string $name, $value, bool $append = false)
    {
        if (!$name || \preg_match('#[^a-z0-9-]#i', $name)) {
            throw new InvalidArgumentException("Header name must be non-empty alphanumeric string, '$name' given.");
        }

        if ($value == null) { // intentionally ==
            if (!$append) {
                unset($this->headers[$name]);
            }

        } elseif (\is_array($value)) { // email
            $tmp = &$this->headers[$name];
            if (!$append || !\is_array($tmp)) {
                $tmp = [];
            }

            foreach ($value as $email => $recipient) {
                if ($recipient === null) {
                    // continue
                } elseif (!Strings::checkEncoding($recipient)) {
                    if (!\preg_match('##u', $recipient)) {
                        throw new InvalidArgumentException('Name is not valid unicode string.');
                    }
                } elseif (\preg_match('#[\r\n]#', $recipient)) {
                    throw new InvalidArgumentException('Name must not contain line separator.');
                }

                if (!\filter_var($email, \FILTER_VALIDATE_EMAIL)) {
                    throw new InvalidArgumentException('Name must match the email structure.');
                }

                $tmp[$email] = $recipient;
            }

        } else {
            $value = (string) $value;
            if (!Strings::checkEncoding($value)) {
                throw new InvalidArgumentException('Header is not valid UTF-8 string.');
            }
            $this->headers[$name] = \preg_replace('#[\r\n]+#', ' ', $value);
        }

        return $this;
    }
1193983
public function result($name = null, $value = null)
    {
        if ($name === null) {
            return $this->result;
        }
        if (array_key_exists($name, $this->result)) {
            if ($value === null) {
                return $this->result[$name];
            }
            $this->result[$name] = $value;
        }
    }
1241136
public function text($name = null, $value = null) 
	{
		Argument::i()
			->test(1, 'string', 'null')
			->test(2, 'scalar', 'null');
			
		$field = Text::i();
		
		if(!is_null($name)) {
			$field->setName($name);
		}
		
		if(!is_null($value)) {
			$field->setValue($value);
		}
		
		return $field;
	}
1070455
public function outputFormat($value, $name)
    {
        $match = [];

        if (preg_match('/^[0]+([a-f0-9]+)$/', $value, $match) === 1) {
            // due to value without 0x prefix, we will parse as decimal
            $value = '0x' . $match[1];
        }
        return BigNumberFormatter::format($value);
    }