Clean details on value

@param   mixed $value
@return  mixed $value
339158
public static function cleanValue($value)
    {
        if (is_array($value)) {
            $new_value = [];

            foreach ($value as $k => $v) {
                $new_value[$k] = self::cleanValue($v);
            }

            return $new_value;
        }

        return stripslashes($value);
    }
1279328
public function clean($value)
  {
    if ($value==='' || $value===null || $value===false)
    {
      return null;
    }

    $tmp = AmbiguityCleaner::get()->clean($value);

    $tmp = str_replace([' ', "\t", "\n"], '', $tmp);
    if ($tmp==='') $tmp = null;

    return $tmp;
  }
979327
public function sanitizeWithCallback($value)
    {
        if ($this->needsSanitization()) {
            return call_user_func(
                $this->getArgument('sanitize'),
                Descend::whileEmpty($value)
            );
        }

        return $value;
    }
133365
public function protectedTrim($value)
    {
        for ($i = count($value) - 1; $i >= 0; -- $i) {
            if ($value[$i]) {
                break;
            }
            unset($value[$i]);
        }
        return $value;
    }
1072529
protected function _cleanValue($value, $trim = false)
    {
        $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
        return ($trim) ? trim($value) : $value;
    }
1009225
public function sanitize($value)
    {
        $value = JApplicationHelper::stringURLSafe($value);

        //limit length
        if (mb_strlen($value) > $this->_length) {
            $value = mb_substr($value, 0, $this->_length);
        }

        return $value;
    }
444492
public static function clearTextConcat($value)
    {
        if (is_string($value)) {
            return trim(preg_replace('/\s+/s', ' ', $value));
        }
        if (is_array($value)) {
            $result = [];
            foreach ($value as $val) {
                $result[] = self::clearTextConcat($val);
            }
            return implode(' ', array_filter($result, 'strlen'));
        }
        return null;
    }
558915
public function sanitize($value)
    {
        $value = (string) $value;

        // Filter var for XSS and other 'bad' code etc.
        if (!empty ($value)) {
            $value = $this->_remove($this->_decode($value));
        }

        return $value;
    }
1026591
protected function filterValue($value)
    {
        if ($this->canFilterValue()) {
            return app('sleeping_owl.wysiwyg')->applyFilter($this->getEditor(), $value);
        }

        return $value;
    }
76306
public function absValue($value)
    {
        /* Remove any negative signs. */
        return ($value[0] == '-') ? substr($this->prepAndClean($value), 1) : $this->prepAndClean($value);
    }
759449
public function clean($value)
  {
    // First prune whitespace.
    $cleaner = PruneWhitespaceCleaner::get();
    $value   = $cleaner->clean($value);

    // If the value is empty return immediately,
    if ($value==='' || $value===null || $value===false)
    {
      return null;
    }

    // Split the URL in parts.
    $parts = parse_url($value);
    if (!is_array($parts))
    {
      return $value;
    }

    return Url::unParseUrl($parts, 'http');
  }
1211597
public function sanitize($value)
    {
        foreach($this->_queue as $filter) {
            $value = $filter->sanitize($value);
        }

        return $value;
    }
1333423
public function sanitize( $value ) {
		if ( isset( $this->choices['save_as'] ) && 'array' === $this->choices['save_as'] ) {
			return [
				'id'     => ( isset( $value['id'] ) && '' !== $value['id'] ) ? (int) $value['id'] : '',
				'url'    => ( isset( $value['url'] ) && '' !== $value['url'] ) ? esc_url_raw( $value['url'] ) : '',
				'width'  => ( isset( $value['width'] ) && '' !== $value['width'] ) ? (int) $value['width'] : '',
				'height' => ( isset( $value['height'] ) && '' !== $value['height'] ) ? (int) $value['height'] : '',
			];
		}
		if ( isset( $this->choices['save_as'] ) && 'id' === $this->choices['save_as'] ) {
			return absint( $value );
		}
		return ( is_string( $value ) ) ? esc_url_raw( $value ) : $value;
	}
74832
protected function _sanitize($value)
    {
        if (null === $this->_charList) {
            return trim((string) $value);
        } else {
            return trim((string) $value, $this->_charList);
        }
    }
456465
private function sanitize($value)
    {
        if ($value === null) {
            $value = 'null';
        }

        if (is_array($value)) {
            $value = 'array';
        }

        if (is_bool($value)) {
            $value = $value
                ? 'true'
                : 'false';
        }

        return $value;
    }
493324
protected function _sanitize($value)
    {
        $value = (string) $value;

        // Filter var for XSS and other 'bad' code etc.
        if (!empty($value)) {
            $value = $this->_remove($this->_decode($value));
        }

        return $value;
    }
325785
public function clean($value)
  {
    // Return null for empty strings.
    if ($value==='' || $value===null || $value===false)
    {
      return null;
    }

    // Replace all ambiguous characters.
    $tmp = $value;
    foreach ($this->ambiguities as $unambiguity => $ambiguities)
    {
      foreach ($ambiguities as $ambiguity)
      {
        // Note: str_replace works fine with multi byte characters like UTF-8.
        $tmp = str_replace($ambiguity, $unambiguity, $tmp);
      }
    }

    // Restore EOL for DOS users.
    if (PHP_EOL!="\n") $tmp = str_replace("\n", PHP_EOL, $tmp);

    // Return null for empty strings.
    if ($tmp==='') $tmp = null;

    return $tmp;
  }