@codeCoverageIgnore

@return string
487832
public function getHelpOutput()
    {
        // print out some "phpUnit-Mode" runtime samples
        $help  = sprintf('%sscan by using your "phpunit.xml" config-file inside "Tests/" directory and using test suite "My Test Suite" directly with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --phpunit-config-suite "<comment>My Test Suite</comment>" --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);
        $help .= sprintf('%sscan by using your "phpunit.xml" config-file inside "Tests/" directory without any given testSuite (so first suite will taken) with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);
        $help .= sprintf('%ssame scan with maximum output-level and disabled ansi output:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> <comment>./Tests/phpunit.xml</comment> --output-level <comment>2</comment>%s', PHP_EOL);

        // print out some "raw-Mode" runtime samples
        $help .= sprintf('%sscan by using raw-mode, using "Tests/" directory as base scan path, autoload file "vendor/autoload.php" and exclude "Tests/data/" with normal output-level and no ansi-colors:%s', PHP_EOL, PHP_EOL);
        $help .= sprintf('<comment>php</comment> <info>./bin/coverfish</info> <info>scan</info> --raw-scan-path <comment>./Tests/phpunit.xml</comment> --raw-autoload-file <comment>vendor/autoload.php</comment> --raw-exclude-path <comment>Tests/data</comment> --output-level <comment>1</comment> --no-ansi%s', PHP_EOL);

        return $help;
    }
210926
public function getFormattedString()
    {
        $string = (string) $this->code;

        if (null !== $this->message) {
            $string = $string . ' ' . $this->message;
        }

        return $string;
    }
805355
public function getSignature(): string
	{
		$input = $this->getArgs();

		$items = [];
		foreach ($input as $key => $val) {
			$items[] = sprintf('%s=%s', $key, $val);
		}

		$items[] = 'password=' . $this->getMerchantConfig()->password;

		return self::hashFunction(implode('&', $items));
	}
285736
protected function OnCode()
    {
        $chars = 'abdefhknrstyz23456789';
        $length = rand(4, 6);
        $numChars = strlen($chars);
        $str = '';
        for ($i = 0; $i < $length; $i++) {
            $str .= substr($chars, rand(1, $numChars) - 1, 1);
        }
        return $str;
    }
406265
protected function buildInlineCode() {
        $result = '';
        foreach ($this->events as $event) {
            /* @var $event \ManiaScript\Builder\Event\AbstractEvent */
            if ($event->getInline()) {
                $result .= $event->getCode() . PHP_EOL;
            } else {
                $result .= $this->buildHandlerFunctionCall($event);
            }
        }
        return $result;
    }
376637
protected function getRegex()
    {

        if( !self::$regexDefault ) {
            self::$regexDefault = implode(
                '|',
                array_map(
                    function($value){
                        return "(?<=[a-z0-9]){$value}(?=[A-Z])";
                    },
                    array_flip( self::$operations )
                )
            );
            self::$regexDefault = "/".self::$regexDefault."/";
        }

        return self::$regexDefault;

    }
893799
protected function getExceptionCode()
    {
        $exception = $this->getException();

        $code = $exception->getCode();
        if ($exception instanceof \ErrorException) {
            // ErrorExceptions wrap the php-error types within the 'severity' property
            $code = Misc::translateErrorCode($exception->getSeverity());
        }

        return (string) $code;
    }
887165
public function buildCode()
    {
        $res = '';
        foreach ($this->styles as $href => $val) {
            $res .= '<link href="' . $href . '" rel="stylesheet" type="text/css" />' . "\r\n";
        }

        return $res;
    }
136013
public function code()
    {
        $code = $this->language()->code() . '_' . $this->territory()->code();

        if ($this->script() != $this->language()->defaultScript()) {
            $code .= '@' . strtolower($this->script()->unicodeName());
        }

        if ($this->variant() !== null) {
            if ($this->variant()->code() === 'posix') {
                $code = 'POSIX';
            } else {
                $code .= '@' . $this->variant()->code();
            }
        }

        return $code;
    }
1242337
private function getCode()
    {
        $_paq = '';

        foreach ($this->options as $option) {
            $option[0] = "'".$option[0]."'";
            $_paq .= sprintf('_paq.push([%s]);', implode(',', $option));
        }

        return <<<PWK
<script>
    var _paq = _paq || [];
    {$_paq}
    (function() {
        var u="{$this->piwikUrl}";
        _paq.push(['setTrackerUrl', u+'piwik.php']);
        _paq.push(['setSiteId', {$this->siteId}]);
        var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
        g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
    })();
</script>
<noscript><p><img src="{$this->piwikUrl}piwik.php?idsite={$this->siteId}" style="border:0;" alt="" /></p></noscript>
PWK;
    }
15367
public function aggregateCoverageInformation()
	{
		if ( !isset($_GET[self::TEST_ID_VARIABLE]) ) {
			return '';
		}

		$coverage = array();
		$filter = new \PHP_CodeCoverage_Filter();

		foreach ( $this->getDataDirectoryFiles() as $data_directory_file ) {
			$raw_coverage_data = unserialize(file_get_contents($data_directory_file));

			foreach ( $raw_coverage_data as $file => $lines ) {
				if ( !$filter->isFile($file) ) {
					continue;
				}

				if ( !isset($coverage[$file]) ) {
					$coverage[$file] = array('md5' => md5_file($file), 'coverage' => $lines);
				}
				else {
					foreach ( $lines as $line => $flag ) {
						if ( !isset($coverage[$file]['coverage'][$line])
							|| $flag > $coverage[$file]['coverage'][$line]
						) {
							$coverage[$file]['coverage'][$line] = $flag;
						}
					}
				}
			}
		}

		return serialize($coverage);
	}
1031149
public function getAsString(): string
    {
        return implode(
            '_',
            array_filter([
                (string) $this->getLanguage(),
                (string) $this->getRegion(),
                (string) $this->getScript(),
            ])
        );
    }
964910
protected function getCode() {
    if (isset($_REQUEST['code'])) {
      if ($this->state !== null &&
          isset($_REQUEST['state']) &&
          $this->state === $_REQUEST['state']) {

        // CSRF state has done its job, so clear it
        $this->state = null;
        $this->clearPersistentData('state');
        return $_REQUEST['code'];
      } else {
        self::errorLog('CSRF state token does not match one provided.');
        return false;
      }
    }

    return false;
  }
656992
protected function getAuthorizationCode()
    {
        $code = null;
        if ($this->responseMode === 'query' && isset($_GET['code'])) {
            $code = $_GET['code'];
        } else if ($this->responseMode === 'form_post' && isset($_POST['code'])) {
            $code = $_POST['code'];
        }

        return $code;
    }
589502
public function check()
    {
        $attributes = $this->getInputAttributes();
        if (array_key_exists('name', $attributes)) {
            $inputName = $attributes['name'];
        } else {
            $inputName = static::DEFAULT_INPUT_NAME;
        }
        $checkCode = $this->request->get($inputName);
        if (!is_string($checkCode)) {
            $checkCode = '';
        }

        return $this->securimage->check($checkCode);
    }
1082860
protected function generateCode()
    {
        $code = '';

        for($i = 1, $cslen = $this->strlen($this->charset); $i <= $this->code_length; ++$i) {
            $code .= $this->substr($this->charset, mt_rand(0, $cslen - 1), 1);
        }

        return $code;
    }
1031670
protected function generateVerifyCode()
    {
        if ($this->minLength > $this->maxLength) {
            $this->maxLength = $this->minLength;
        }
        if ($this->minLength < 3) {
            $this->minLength = 3;
        }
        if ($this->maxLength > 20) {
            $this->maxLength = 20;
        }
        $length = mt_rand($this->minLength, $this->maxLength);

        $letters = [0,1,2,3,4,5,6,7,8,9];
        return array_rand($letters).array_rand($letters).array_rand($letters).array_rand($letters);
		//$vowels = '01234';
        //$code = '';
       // for ($i = 0; $i < $length; ++$i) {
            //if ($i % 2 && mt_rand(0, 10) > 2 || !($i % 2) && mt_rand(0, 10) > 9) {
            //    $code .= $vowels[mt_rand(0, 4)];
            //} else {
               // $code .= $letters[mt_rand(0, 20)];
           // }
       // }

        //return $code;
    }