@param string $to

@return string
977361
private function recipientDescription(string $to): string
    {
        switch ($to) {
            default:
            case 'all':
                return I18N::translate('Send a message to all users');
            case 'never_logged':
                return I18N::translate('Send a message to users who have never signed in');
            case 'last_6mo':
                return I18N::translate('Send a message to users who have not signed in for 6 months');
        }
    }
662147
public static function toCamelCase($stringToConvert)
    {
        $key = $stringToConvert;

        if (isset(self::$camelCache[$key])) {
            return self::$snakeCache[$key];
        }

        $stringToConvert = self::toStudlyCase($stringToConvert);

        self::$camelCache[$key] = lcfirst($stringToConvert);

        return self::$camelCache[$key];
    }
1087099
public function renameFolder($from, $to)
    {
        $result = $this->execute('RENAME', array($this->escape($from), $this->escape($to)),
            self::COMMAND_NORESPONSE);

        return $result == self::ERROR_OK;
    }
87737
public static function nested($to = 1)
    {
        static::$to = $to;
        static::$nested = is_numeric($to) ? $to : false;

        return new self();
    }
900406
public static function routeParse($from, $to, $url)
    {
        // validation and parse route pattern
        $result = preg_match('/^(\(([^\)]+)\)|[^\/]*)(.*)/', $from, $data);

        if ($result !== 1) {
            return false;
        }

        // prepare patter to test url and replacement
        $pattern = '/^' . str_replace('/', '\/', $data[3]) . '$/';

        // test route pattern match
        $result = preg_match($pattern, $url);

        if ($result !== 1) {
            return false;
        }

        // create RouteInfo object and fill fields
        $route = new RouteInfo();
        // make array of supported methods
        $route->methods = empty($data[2]) ? [] : explode('|', $data[2]);
        // replace pattern url
        $route->url = preg_replace($pattern, $to, $url);

        return $route;
    }
1142315
public static function objectToID($object)
    {
        $resultID = null;
        if (is_object($object) && method_exists($object, '__toString')
        ) {
            $resultID = $object->__toString();
        } else {
            if (is_array($object)) {
                foreach ($object as $item => $value) {
                    $resultID[$item] = self::objectToID($value);
                }
            } else { //String
                $resultID = $object;
            }
        }

        return $resultID;
    }
300831
public function signToField($to)
    {
        return array_map(function ($recipient) {
            $bits = explode(':', $recipient);
            $recipient_feed = $this->client->feed($bits[0], $bits[1]);
            $recipient_token = $recipient_feed->getToken();

            return "$recipient $recipient_token";
        }, $to);
    }
879286
public function toString($value) {
		if (is_null($value))
			return null;
		elseif (is_string($value))
			return $value;
		elseif (is_resource($value) || is_array($value))
			return false;
		elseif (is_object($value)) {
			if (method_exists($value, '__toString')) {
				$rm = (new \ReflectionClass($value))->getMethod('__toString');
				if ($rm->isPublic())
					return $value->__toString();
				return false;
			}
	
			return false;
		}
	
		return strval($value);
	}
829628
public function ireplace($from, $to)
    {
        if (\is_callable($to)) {
            $to = $to($from, $this->string);
        }

        $this->string = \str_ireplace($from, $to, $this->string);
        return $this;
    }
196854
public function diff($from, $to): string
    {
        $diff = $this->differ->diff($from, $to);

        if (preg_match(
            '/(?:[^\n]*(\n)){' . self::DIFF_MAX_LINES . '}/',
            $diff,
            $matches,
            PREG_OFFSET_CAPTURE
        )) {
            $diff = substr($diff, 0, $matches[1][1]);
        }

        return $diff;
    }
148189
public function translateTimeStringTo($timeString, $to = null)
    {
        return static::translateTimeString($timeString, $this->getLocalTranslator()->getLocale(), $to);
    }
219134
private function tostring($value)
    {
        if (!isset($value)) {
            return 'null';
        }
        if ($value === true) {
            return 'true';
        }
        if ($value === false) {
            return 'false';
        }
        if (is_array($value)) {
            $out = '[';
            $i = 0;
            foreach ($value as $key => $entry) {
                if ($i) {
                    $out .= ', ';
                }
                $out .= $key.' => '.$this->tostring($entry);
                $i++;
            }
            $out .= ']';
            return $out;
        }
    }
1263670
public static function mailto(string $string = null): string
    {
        return ($string ? '<a href="mailto:' . str_replace('@', '%40', $string) . '">' . str_replace('@', '&#064;', $string) . '</a>' : '');
    }
290468
public function getPartialSum( $from, $to )
	{
		for( $i=$from; $i<=$to; $i++ )
			$sum += $this->getValue( $i );
		return $sum;
	}
815510
private function _replace($from, $to) : array
    {
        $values = $this->getValues();
        foreach($values as $key => $value)
        {
            if ($value === $from)
            {
                $values[$key] = $to;
            }
        }
        return $values;
    }
644017
public function toList(array $to)
    {
        foreach ($to as $name => $to) {
            $this->to[] = $this->formatEmail($to, !is_int($name) ? $name : null);
        }

        return $this;
    }
581690
public static function rename($from, $to)
    {
        $object = get_class(self::$driver);

        return $object::rename($from, $to);
    }