Generate a buzzword-laden catch phrase.

@return string
484863
public static function catchPhrase()
    {
        return
            static::$catchPhraseParts[0][array_rand(static::$catchPhraseParts[0])] . ' ' .
            static::$catchPhraseParts[1][array_rand(static::$catchPhraseParts[1])] . ' ' .
            static::$catchPhraseParts[2][array_rand(static::$catchPhraseParts[2])];
    }
810874
public function getKeyword()
    {
        if ($this->getMsgType() == 'text') {
            return strtolower($this->getContent());
        } elseif ($this->getMsgType() == 'event' && strtolower($this->getEvent()) == 'click') {
            return strtolower($this->getEventKey());
        }
        return false;
    }
489118
protected function getContextMessage(): string
    {
        $context = ArrayHelper::filter($GLOBALS, $this->logVars);
        $result = [];
        foreach ($context as $key => $value) {
            $result[] = "\${$key} = " . VarDumper::dumpAsString($value);
        }

        return implode("\n\n", $result);
    }
1229523
public function generate()
	{
		$title         = $this->getTitle();
		$description   = $this->getDescription();
		$keywords      = $this->getKeywords();
		$miscellaneous = $this->getMiscellaneous();
		$canonical     = $this->getCanonical();

		$html[] = '<title>'.$title.'</title>'.PHP_EOL;

		if (! is_null($description)) {
			$html[] = '<meta name="description" content="'.$description.'">';
		}

		if (! is_null($keywords)) {
			$html[] = '<meta name="keywords" content="'.$keywords.'">';
		}

		if (! is_null($miscellaneous)) {
			foreach ($miscellaneous as $name => $content) {
				$html[] = '<meta name="'.$name.'" content="'.$content.'">';
			}
		}

		if (! is_null($canonical)) {
			$currentUrl = $this->request->fullUrl();

			if ($canonical != $currentUrl) {
				$html[] = PHP_EOL.'<link rel="canonical" href="'.$canonical.'">';
			}
		}

		return implode(PHP_EOL, $html);
	}
801262
public function buildAlerts()
    {
        $str = '';
        foreach ($this->alerts as $alert) {
            $str = $this->build($alert);
        }
        return $str;
    }
1261284
public function getLeadingCommentAndWhitespaceText() : string {
        // TODO re-tokenize comments and whitespace
        $fileContents = $this->getFileContents();
        foreach ($this->getDescendantTokens() as $token) {
            return $token->getLeadingCommentsAndWhitespaceText($fileContents);
        }
    }
715630
public static function messageName(): string
    {
        if (array_key_exists($class = static::class, self::$hmlbDDDMessageNamesCache)) {
            return self::$hmlbDDDMessageNamesCache[$class];
        }

        self::$hmlbDDDMessageNamesCache[$class] = $name = static::generateMessageNameFromClassName();

        return $name;
    }
801686
protected function generateVerifyCode()
    {
        // alphabets ?
        if (!$this->useMbChars) {
            return parent::generateVerifyCode();
        }

        $seeds = $this->getCaptchaSeeds();
        $len = mb_strlen($seeds, 'UTF-8');

        for ($code = '', $i = 0; $i < $this->getCaptchaLength(); ++$i) {
            $code .= mb_substr($seeds, mt_rand(0, $len - 1), 1, 'UTF-8');
        }

        return $code;
    }
835195
protected function generateRegard(): string
    {
        $unique = $this->eliminateDuplicateCharacters($this->unity($this->wholeText));
        foreach (self::FREQUENT_REGARDS as $i => $regard) {
            if (preg_match("/$regard/u", $unique) === 1) {
                return $i === 0 ? '' : $regard;
            }
        }
        return '[' . preg_quote($unique, '/') . ']';
    }
915381
public function encoded()
    {
        $mentions = $this->get();
        $encoded = collect();

        foreach ($mentions as $mention) {
            $pool = $this->mention->pool($mention);
            $encoded->push("{$pool->key}:{$mention->getKey()}");
        }

        return $encoded->implode(',');
    }
243271
public function getParentString()
    {
        $keywordsArray = array();

        /** @var eZTagsObject[] $path */
        $path = $this->getPath( false, true );
        if ( is_array( $path ) && !empty( $path ) )
        {
            foreach ( $path as $tag )
            {
                $synonymsCount = $tag->getSynonymsCount( true );
                $keywordsArray[] = $synonymsCount > 0 ? $tag->attribute( 'keyword' ) . ' (+' . $synonymsCount . ')' : $tag->attribute( 'keyword' );
            }
        }

        $synonymsCount = $this->getSynonymsCount( true );
        $keywordsArray[] = $synonymsCount > 0 ? $this->attribute( 'keyword' ) . ' (+' . $synonymsCount . ')' : $this->attribute( 'keyword' );

        return implode( ' / ', $keywordsArray );
    }
628728
public function getRandomPassword()
    {
        $salt = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKMNPQRSTUVWXYZ0123456789";
        $pass = "";

        srand((double)microtime()*1000000);

        $i = 0;

        while ($i <= 7)
        {
            $num = rand() % strlen($salt);
            $tmp = substr($salt, $num, 1);
            $pass = $pass . $tmp;
            $i++;
        }

        return $pass;
    }
407898
private function createMessage(): string
    {
        $message = '';
        foreach (libxml_get_errors() as $error) {
            $message .= trim($error->message) . (($error->file) ? (' in file ' . $error->file) : ('')) . ' on line ' . $error->line . ' in column ' . $error->column . "\n";
        }

        libxml_clear_errors();
        if (strlen($message) === 0) {
            return 'Transformation failed: unknown error.';
        }

        return $message;
    }
655709
public function getKeywords()
    {
        $catchWord = $this->xml->xpath('//NewsLines/NewsLine/NewsLineType[@FormalName="CatchWord"]');

        return (empty($catchWord)) ? array() : array($this->getString(array_shift($catchWord)->xpath('following::NewsLineText')));
    }
1031149
public function getAsString(): string
    {
        return implode(
            '_',
            array_filter([
                (string) $this->getLanguage(),
                (string) $this->getRegion(),
                (string) $this->getScript(),
            ])
        );
    }
171670
public function getPhrases()
    {   
        $phrases = [];

        for($index = $this->nGramSize; $index >= 2; $index--)
        {                     
            $phrases = array_merge($phrases, NGramFactory::create($this->getTokens(), $index));                        
        }
        
        // you cannot use a phrase if it is a substring of a longer phrase
        // we must exclude all of the substring phrases        
        $add = [];
        $remove = [];
        foreach($phrases as $phrase) 
        {   
            if(isset($remove[$phrase])) {
                continue;
            } elseif (!isset($add[$phrase])) {
                $add[$phrase] = true;
                // remove the suffix word
                $remove[substr($phrase, 0, strrpos($phrase," "))] = true; 
                //remove the prefix            
                $remove[substr($phrase, strpos($phrase," ")+1)] = true;                 
            }
        }        
        return array_keys($add);        
    }
12853
protected function getPromptText()
    {
        if ($this->prompt === null) {
            $isMulti = ends_with($this->getDisplayMode(), 'multi');
            $this->prompt = $isMulti
                ? 'backend::lang.fileupload.upload_file'
                : 'backend::lang.fileupload.default_prompt';
        }

        return str_replace('%s', '<i class="icon-upload"></i>', e(trans($this->prompt)));
    }