Run the Normalizer.

@return mixed normalized $value
186258
public function run()
    {
        //normalize remaining backslashes
        if ($this->value != preg_replace('/(\w)\\\/', '$1', $this->value)) {
            $this->value .= preg_replace('/(\w)\\\/', '$1', $this->value);
        }

        $compare = stripslashes($this->value);

        $pattern = [
            '/(?:<\/\w+>\+<\w+>)/s',
            '/(?:":\d+[^"[]+")/s',
            '/(?:"?"\+\w+\+")/s',
            '/(?:"\s*;[^"]+")|(?:";[^"]+:\s*")/s',
            '/(?:"\s*(?:;|\+)[^"]{8,18}:\s*")/s',
            '/(?:";\w+=)|(?:!""&&")|(?:~)/s',
            '/(?:"?"\+""?\+?"?)|(?:;\w+=")|(?:"[|&]{2,})/s',
            '/(?:"\s*\W+")/s',
            '/(?:";\w\s*\+=\s*\w?\s*")/s',
            '/(?:"[|&;]+\s*[^|&\n]*[|&]+\s*"?)/s',
            '/(?:";\s*\w+\W+\w*\s*[|&]*")/s',
            '/(?:"\s*"\s*\.)/s',
            '/(?:\s*new\s+\w+\s*[+",])/',
            '/(?:(?:^|\s+)(?:do|else)\s+)/',
            '/(?:[{(]\s*new\s+\w+\s*[)}])/',
            '/(?:(this|self)\.)/',
            '/(?:undefined)/',
            '/(?:in\s+)/',
        ];

        // strip out concatenations
        $converted = preg_replace($pattern, null, $compare);

        //strip object traversal
        $converted = preg_replace('/\w(\.\w\()/', '$1', $converted);

        // normalize obfuscated method calls
        $converted = preg_replace('/\)\s*\+/', ')', $converted);

        //convert JS special numbers
        $converted = preg_replace(
            '/(?:\(*[.\d]e[+-]*[^a-z\W]+\)*)|(?:NaN|Infinity)\W/ims',
            1,
            $converted
        );

        if ($converted && ($compare != $converted)) {
            $this->value .= "\n".$converted;
        }

        return $this->value;
    }
606699
public function run()
    {
        error_reporting(0);
        $this->configManager = new ConfigurationManager(ConfigurationManager::getAutogeneratedFile());
        // TODO: Implement run() method.
        if(isset($this->mainConfig['app']['configured']) && isset($this->config['configured']) && $this->mainConfig['app']['configured'] && $this->config['configured'])
        {
            $this->addMessage("El sitio ya esta configurado! Acceda con un administrador al panel de control y reinicie la instalacion.", "warning");
            $this->quit("/");
            return true;
        }
        $this->step = $this->params['step'];
        $this->steps = $this->getSteps();
        if(!$this->step) $this->step = "1";
        $index = intval($this->step) - 1;
        if(!isset($this->steps[$index]))
        {
            $this->addMessage("Este paso no esta disponible en el instalador!");
            return $this->quit($this->getLink($this, array('step' => '1')));
        }
        $call = $this->steps[$index]['function'];
        if(($view = call_user_func($call, $this)) === true)
        {
            return $this->quit($this->getLink($this, array('step' => $index + 2)));
        }
        $this->view = $view;
    }
334428
protected function run()
    {
        $this->version = $this->get(VersionAnalyzer::class);
        try {
            return $this->analyzeExtended();
        } catch (Exception $e) {
            return $this->analyzeSimple($e);
        }
    }
858305
public function run()
    {
        $include = $this->arg->getParameter('--include');

        if (is_string($include)) {
            $bootstraps = array_merge(
                $this->setting->getBootstrap(),
                (array) $include
            );

            $this->setting->setBootstrap($bootstraps);
        }

        if (!class_exists('\Psy\Shell')) {
            echo Color::red('Please, insall psy/psysh:@stable');

            return;
        }

        $config = new \Psy\Configuration();

        $config->setUpdateCheck(\Psy\VersionUpdater\Checker::NEVER);

        // Load the custum prompt
        $prompt = $this->arg->options('--prompt');

        if (is_null($prompt)) {
            $prompt = '(bow) >>';
        }

        $prompt = trim($prompt).' ';
        
        $config->setPrompt($prompt);

        $shell = new \Psy\Shell($config);

        $shell->setIncludes($this->setting->getBootstrap());

        return $shell->run();
    }
247431
protected function run()
    {
        $versionString = rtrim($this->readHeaderRaw(8));
        $subVersion = round($this->readHeader('f', 4), 2);

        $version = $this->getVersion($versionString, $subVersion);

        $analysis = new Version($this->rec, $versionString, $subVersion);
        $analysis->version = $version;

        $analysis->isTrial = in_array($version, $this->trialVersions);
        $analysis->isAoK = in_array($version, $this->aokVersions);
        $analysis->isUserPatch = in_array($version, $this->userpatchVersions);
        $analysis->isUserPatch15 = $version === Version::VERSION_USERPATCH15;
        $analysis->isHDEdition = in_array($version, $this->hdVersions);
        $analysis->isHDPatch4 = $analysis->isHDEdition && $subVersion >= 12.00;
        $analysis->isAoC = $analysis->isUserPatch || $analysis->isHDEdition ||
            in_array($version, $this->aocVersions);

        $analysis->isMgl = $analysis->isAoK;
        $analysis->isMgx = $analysis->isAoC;
        $analysis->isMgz = $analysis->isUserPatch;
        // FIXME Not sure if this is the correct cutoff point.
        //
        // test/recs/versions/mgx2_simple.mgx2
        //    has subVersion == 12.31
        // test/recs/versions/MP Replay v4.3 @2015.09.11 221142 (2).msx
        //    has subVersion == 12.34
        // So it's somewhere between those two.
        $analysis->isMsx = $subVersion >= 12.32;
        $analysis->isAoe2Record = $subVersion >= 12.36;

        return $analysis;
    }
31034
public function run()
    {
        $maxATime = time() - self::TTL;

        $files = Finder::create()
            ->in($this->storePath)
            ->depth(1)
            ->name(Runner::BOOTSTRAP_FILENAME)
            ->filter(function (SplFileInfo $d) use ($maxATime) {
                return $d->getATime() < $maxATime;
            })
        ;

        $directories = array();

        foreach ($files as $file) {
            $directories[] = dirname($file);
        }

        $this->filesystem->remove($directories);
    }
336518
public function run() {
		$options    = $this->get_class_vars( 'Base', 'options' );
		$db_version = isset( $options['db_version'] ) ? (int) $options['db_version'] : 6000;

		if ( $db_version === $this->db_version ) {
			return;
		}

		switch ( $db_version ) {
			case $db_version < $this->db_version:
				$this->delete_flush_cache();
				break;
			default:
				break;
		}

		$options = array_merge( (array) $options, [ 'db_version' => (int) $this->db_version ] );
		update_site_option( 'github_updater', $options );
	}
123245
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        $decoded = json_decode($this->value, 1);
        $result  = (json_last_error() == JSON_ERROR_NONE) && is_array($decoded);
        if ($result) {
            /* decoded is array */
            if (is_array($decoded)) {
                $arrayValue = '';
                array_walk_recursive($decoded, function ($value, $key) use (&$arrayValue) {
                    $arrayValue .= $key.' '.$value;
                });
                $this->value = $arrayValue;
            }
        }

        return $this->value;
    }
704573
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        // check for existing comments
        if (preg_match('/(?:\<!-|-->|\/\*|\*\/|\/\/\W*\w+\s*$)|(?:--[^-]*-)/ms', $this->value)) {
            $pattern = [
                '/(?:(?:<!)(?:(?:--(?:[^-]*(?:-[^-]+)*)--\s*)*)(?:>))/ms',
                '/(?:(?:\/\*\/*[^\/\*!]*)+\*\/)/ms', //add ! to avoid remove sql target comments /*! */
                '/(?:--[^-]*-)/ms',
            ];
            $converted   = preg_replace($pattern, ';', $this->value);
            $this->value = "\n".$converted;
        }
        //make sure inline comments are detected and converted correctly
        $this->value = preg_replace('/(<\w+)\/+(\w+=?)/m', '$1/$2', $this->value);
        $this->value = preg_replace('/\/\*([^!]+)?!([^\*\/]+)\*\//m', ' $1 $2 ', $this->value);
        $this->value = preg_replace('/[^\\\:]\/\/(.*)$/m', '/**/$1', $this->value);
        $this->value = preg_replace('/([^\-&])#.*[\r\n\v\f]/m', '$1', $this->value);
        $this->value = preg_replace('/([^&\-])#.*\n/m', '$1 ', $this->value);
        $this->value = preg_replace('/^#.*\n/m', ' ', $this->value);

        return $this->value;
    }
686496
public function run()
	{
		$this->say('Zipping ' . $this->getJConfig()->extension . " " . $this->getJConfig()->version);

		// Instantiate the zip archive
		$this->zip->open($this->target, \ZipArchive::CREATE);

		// Process the files to zip
		foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->getBuildFolder()), \RecursiveIteratorIterator::SELF_FIRST) as $subfolder)
		{
			if ($subfolder->isFile())
			{
				// Set all separators to forward slashes for comparison
				$usefolder = str_replace('\\', '/', $subfolder->getPath());

				// Drop the folder part as we don't want them added to archive
				$addpath = str_ireplace($this->getBuildFolder(), '', $usefolder);

				// Remove preceding slash
				$findfirst = strpos($addpath, '/');

				if ($findfirst == 0 && $findfirst !== false)
				{
					$addpath = substr($addpath, 1);
				}

				if (strlen($addpath) > 0 || empty($addpath))
				{
					$addpath .= '/';
				}

				$options = array('add_path' => $addpath, 'remove_all_path' => true);
				$this->zip->addGlob($usefolder . '/*.*', GLOB_BRACE, $options);
			}
		}

		// Close the zip archive
		$this->zip->close();

		return true;
	}
341938
public function run()
    {
        $documents = $this->repo->findAll();

        if ($predicates = $this->predicate->getAll()) {
            $documents = $this->filter($documents, $predicates);
        }

        if ($this->orderBy) {
            $sorts = array();
            foreach ($this->orderBy as $order) {
                $parts = explode(' ', $order, 2);
                // TODO - validate parts
                $sorts[] = array(
                    $parts[0],
                    isset($parts[1]) && $parts[1] == 'DESC' ? SORT_DESC : SORT_ASC
                );
            }

            $documents = $this->sort($documents, $sorts);
        }

        $totalCount = count($documents);

        if ($this->limit) {
            list($count, $offset) = $this->limit;
            $documents = array_slice($documents, $offset, $count);
        }

        return new Result(array_values($documents), $totalCount);
    }
847806
public function run()
	{
		$timestamp = date( 'Y-m-d H:i:s' );
		$context = clone $this->_getContext();

		$context->getLocale()->setLanguageId( null );
		$context->getLocale()->setCurrencyId( null );

		$manager = MShop_Catalog_Manager_Factory::createManager( $context )->getSubManager( 'index' );
		$manager->rebuildIndex();
		$manager->cleanupIndex( $timestamp );
	}
1284722
public function getNormalized()
    {
        if (!isset($this->normalizedConfig)) {
            $this->normalizedConfig = $this->normalizeConfig($this->config);
        }

        return $this->normalizedConfig;
    }
665633
public function normalize()
    {
        $values = $this->toArray();

        for ($i = 0, $total = count($values); $i < $total; $i++) {
            if (strpos($values[$i], $this->glue) !== false) {
                // Explode on glue when the glue is not inside of a comma
                foreach (preg_split('/' . preg_quote($this->glue) . '(?=([^"]*"[^"]*")*[^"]*$)/', $values[$i]) as $v) {
                    $values[] = trim($v);
                }
                unset($values[$i]);
            }
        }

        $this->values = array_values($values);

        return $this;
    }
584983
public function run()
    {
        if ($this->isConfig()) {
            $app = $this->config;
            $res = \limx\func\File::copy($app['root'], $app['files'], $app['dst']);
            if ($res === false) {
                $this->error('the files copy failed');
                return false;
            }
            $vi = empty($app['vi']) ? 'master' : $app['vi'];
            $zipname = basename($app['dst']) . '_vi.' . $vi . '.' . time() . '.zip';
            $res = \limx\func\File::zip(dirname($app['dst']), basename($app['dst']), dirname($app['dst']), $zipname);
            if ($res === true) {
                $this->info('package the program success');
            } else {
                $this->error('zip files failed:code=' . $res);
            }
        }
    }
1273979
public function run()
    {
        if (! $this->runPreSearch()) {
            return $this->value;
        }

        $converted = null;
        //deal with double encoded payload
        $this->value = preg_replace('/&amp;/', '&', $this->value);
        if (preg_match('/&#x?[\w]+/ms', $this->value)) {
            $converted = preg_replace('/(&#x?[\w]{2,6}\d?);?/ms', '$1;', $this->value);
            $converted = html_entity_decode($converted, ENT_QUOTES, 'UTF-8');
            $this->value .= "\n".str_replace(';;', ';', $converted);
        }
        // normalize obfuscated protocol handlers
        $this->value = preg_replace(
            '/(?:j\s*a\s*v\s*a\s*s\s*c\s*r\s*i\s*p\s*t\s*:)|(d\s*a\s*t\s*a\s*:)/ms',
            'javascript:',
            $this->value
        );

        return $this->value;
    }
191037
public function run()
    {
        $data       = $this->parseRequestUri();
        $controller = $data['controller'];
        $method     = $data['method'];
        $params     = $data['params'];

        $subModule  = $this->subModule;
        if ("" != $subModule) {
            $subModule = "\\" . $subModule;
        }

        $class      = sprintf("%s\\Controller%s\\%sController", $this->appNameSpace, $subModule, $controller);
        if (!(class_exists($class) && method_exists($class, $method))) {
            $this->fileNotFound();
        } else {
            $class  = new $class;
            $pipe = new Pipeline();
            $pipe->through($class->getMiddleWare())->then(function () use ($class, $method, $params) {
                call_user_func_array(array($class, $method), $params);
            });

            //call_user_func_array(array($class, $method), $params);
        }
    }