Get cleaner other info.

@param \simplehtmldom_1_5\simple_html_dom $next_info
@param string                             $clean_info_type
@param string|array                       $clean_info_value

@return string|array
2775
private function getCleanerInfo2($next_info, $clean_info_type, $clean_info_value)
    {
        if ($clean_info_type == 'producers'
            || $clean_info_type == 'licensors'
            || $clean_info_type == 'studios'
            || $clean_info_type == 'genres'
            || $clean_info_type == 'authors'
        ) {
            $info_temp = [];
            $info_temp_index = 0;
            if ($clean_info_value != 'None found') {
                foreach ($next_info->find('a') as $each_info) {
                    $temp_id = explode('/', $each_info->href);
                    $info_temp[$info_temp_index]['id'] = $clean_info_type == 'authors' ? $temp_id[2] : $temp_id[3];
                    $info_temp[$info_temp_index]['name'] = $each_info->plaintext;
                    $info_temp_index++;
                }
            }

            return $info_temp;
        }

        return $clean_info_value;
    }
25467
public function nextIf($type, $value = null)
    {
        if ($this->test($type, $value)) {
            return $this->next();
        }
    }
475883
public function getCleanUri(): string
    {
        if ($this->cleanUri === null) {
            $uri = Request::getUri()->getPath();
            if ($this->getBaseUrl() && strpos($uri, $this->getBaseUrl()) === 0) {
                $uri = substr($uri, \strlen($this->getBaseUrl()));
            }
            $this->cleanUri = $uri;
        }
        return $this->cleanUri;
    }
158630
@Override
  public GetInfoValue getInfo(SessionHandle sessionHandle, GetInfoType infoType)
      throws HiveSQLException {
    try {
      // FIXME extract the right info type
      TGetInfoReq req = new TGetInfoReq(sessionHandle.toTSessionHandle(), infoType.toTGetInfoType());
      TGetInfoResp resp = cliService.GetInfo(req);
      checkStatus(resp.getStatus());
      return new GetInfoValue(resp.getInfoValue());
    } catch (HiveSQLException e) {
      throw e;
    } catch (Exception e) {
      throw new HiveSQLException(e);
    }
  }
1085185
public function clean($var, $filters = null, $type = 'input_filter')
	{
		// if no filters are given, load the defaults from config
		if ($filters === null)
		{
			$filters = isset($this->config[$type]) ? $this->config[$type] : [];
		}

		// and make sure it's an array
		$filters = is_array($filters) ? $filters : [$filters];

		foreach ($filters as $filter)
		{
			// do we have this filter loaded? or can we load it?
			if (array_key_exists(strtolower($filter), $this->filters) or $this->loadFilter($filter))
			{
				$filter = $this->filters[strtolower($filter)];
			}

			// does the filter have a callable clean() method?
			if (is_callable(array($filter, 'clean')))
			{
				$var = $filter->clean($var);
			}

			// is the filter callable in itself?
			elseif (is_callable($filter))
			{
				$var = $filter($var);
			}

			// assume it's a regex of characters to filter
			else
			{
				$var = $this->filterRegex($var, $filter);
			}
		}

		return $var;
	}
254534
public static function Clean($Mixed) {
       if (!is_string($Mixed)) return self::To($Mixed, 'Clean');
       $Mixed = strtr($Mixed, self::$_CleanChars);
       $Mixed = preg_replace('/[^A-Za-z0-9 ]/', '', urldecode($Mixed));
       $Mixed = preg_replace('/ +/', '-', trim($Mixed));
       return strtolower($Mixed);
   }
1288584
private function getAnimeType($info_area)
    {
        $type = $info_area->find('.info', 0)->plaintext;
        $type = explode('-', $type);

        return trim($type[0]);
    }
998081
public function clean( $maxlifetime, $next ) {
		global $wpdb;

		// Session is expired if now - item.time > maxlifetime
		// Said another way, if  item.time < now - maxlifetime
		$filter = intval( time() - $maxlifetime );
		$keys   = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE option_name LIKE '_wp_session_expires_%' AND option_value > $filter ORDER BY option_value LIMIT 0, 1000" );

		foreach ( $keys as $expiration ) {
			$key        = $expiration->option_name;
			$session_id = $this->sanitize( substr( $key, 20 ) );

			$this->_delete( $session_id );
		}

		return $next( $maxlifetime );
	}
1212749
protected function isMultiValuedPropertyDirty(array $cleanData, $currentValue)
    {
        if (count($cleanData['value']) > 0 && count($cleanData['value']) === count($currentValue)) {
            if ($currentValue instanceof \SplObjectStorage) {
                $cleanIdentifiers = [];
                foreach ($cleanData['value'] as &$cleanObjectData) {
                    $cleanIdentifiers[] = $cleanObjectData['value']['identifier'];
                }
                sort($cleanIdentifiers);
                $currentIdentifiers = [];
                foreach ($currentValue as $currentObject) {
                    $currentIdentifier = $this->getIdentifierByObject($currentObject);
                    if ($currentIdentifier !== null) {
                        $currentIdentifiers[] = $currentIdentifier;
                    }
                }
                sort($currentIdentifiers);
                if ($cleanIdentifiers !== $currentIdentifiers) {
                    return true;
                }
            } else {
                foreach ($cleanData['value'] as &$cleanObjectData) {
                    if (!isset($currentValue[$cleanObjectData['index']])) {
                        return true;
                    }
                    if (($cleanObjectData['type'] === 'array' && $this->isMultiValuedPropertyDirty($cleanObjectData, $currentValue[$cleanObjectData['index']]) === true)
                        || ($cleanObjectData['type'] !== 'array' && $this->isSingleValuedPropertyDirty($cleanObjectData['type'], $cleanObjectData['value'], $currentValue[$cleanObjectData['index']]) === true)) {
                        return true;
                    }
                }
            }
        } elseif (count($cleanData['value']) > 0 || count($currentValue) > 0) {
            return true;
        }
        return false;
    }
829852
public function cleanup($dirty, $languageCode = null)
    {
        $replacers = $this->replacers['default'];

        if (null !== $languageCode) {
            $replacers = array_merge(
                $replacers,
                (isset($this->replacers[$languageCode]) ? $this->replacers[$languageCode] : [])
            );
        }

        if (count($replacers) > 0) {
            foreach ($replacers as $key => $value) {
                $dirty = str_replace($key, $value, $dirty);
            }
        }

        $clean = strtolower($dirty);

        // Inspired by ZOOLU
        // delete problematic characters
        $clean = str_replace('%2F', '/', urlencode(preg_replace('/([^A-za-z0-9 -_\/])/', '', $clean)));

        // replace multiple dash with one
        $clean = preg_replace('/([-]+)/', '-', $clean);

        // remove dash after slash
        $clean = preg_replace('/\/[-]+/', '/', $clean);

        // delete dash at the beginning or end
        $clean = preg_replace('/^([-])/', '', $clean);
        $clean = preg_replace('/([-])$/', '', $clean);

        // remove double slashes
        $clean = str_replace('//', '/', $clean);

        return $clean;
    }
1044535
protected function getNext() {
		if ($this->get('page')< $this->pageTotal) {
			return $this->replaceLine($this->get('page')+ 1, $this->get('next'));
		}
		return null;
	}
986655
function clean(value) {
  var copy

  if (typeof value === 'string') {
    value = [value]
  }

  if (value && 'length' in value && value.length !== 0) {
    copy = value
    value = {}

    copy.forEach(function(phrase) {
      value[phrase] = 'a' /* Example category */
    })
  }

  return value
}
673078
static function get_info($uri)
    {
        if (isset(self::$list_info[$uri])) {
            return self::$list_info[$uri];
        }
        return null;
    }
623520
public function clean($text)
    {
        if (!$this->handler) {
            return $text;
        }

        $handler = $this->handler;

        return $handler($text);
    }
214528
private function nextLink(LinkType $link, ResourceObject $ro, $nextResource) : ResourceObject
    {
        $nextBody = $nextResource instanceof ResourceObject ? $nextResource->body : $nextResource;

        if ($link->type === LinkType::SELF_LINK) {
            $ro->body = $nextBody;

            return $ro;
        }

        if ($link->type === LinkType::NEW_LINK) {
            $ro->body[$link->key] = $nextBody;

            return $ro;
        }

        // crawl
        return $ro;
    }
407244
public function neighbouring_discussion_navigation($prev, $next) {
        $html = '';
        if ($prev || $next) {
            $html .= html_writer::start_tag('div', array('class' => 'discussion-nav clearfix'));
            $html .= html_writer::start_tag('ul');
            if ($prev) {
                $url = new moodle_url('/mod/forum/discuss.php', array('d' => $prev->id));
                $html .= html_writer::start_tag('li', array('class' => 'prev-discussion'));
                $html .= html_writer::link($url, format_string($prev->name),
                    array('aria-label' => get_string('prevdiscussiona', 'mod_forum', format_string($prev->name))));
                $html .= html_writer::end_tag('li');
            }
            if ($next) {
                $url = new moodle_url('/mod/forum/discuss.php', array('d' => $next->id));
                $html .= html_writer::start_tag('li', array('class' => 'next-discussion'));
                $html .= html_writer::link($url, format_string($next->name),
                    array('aria-label' => get_string('nextdiscussiona', 'mod_forum', format_string($next->name))));
                $html .= html_writer::end_tag('li');
            }
            $html .= html_writer::end_tag('ul');
            $html .= html_writer::end_tag('div');
        }
        return $html;
    }
844419
public function server($index, $xss_clean = true)
    {
        if ($xss_clean) {
            return XssClean::getXssClean()->xss_clean($this->request->server[$index]??'');
        } else {
            return $this->request->server[$index]??'';
        }
    }