src/Factory.php
public static function fromRuleSet(RuleSet $ruleSet, array $overrideRules = [])
    {
        if (\PHP_VERSION_ID < $ruleSet->targetPhpVersion()) {
            throw new \RuntimeException(\sprintf(
                'Current PHP version "%s is less than targeted PHP version "%s".',
                \PHP_VERSION_ID,
                $ruleSet->targetPhpVersion()
            ));
        }

        $config = new Config($ruleSet->name());

        $config->setRiskyAllowed(true);
        $config->setRules(\array_merge(
            $ruleSet->rules(),
            $overrideRules
        ));

        return $config;
    }
public static function fromRuleSet(RuleSet $ruleSet, array $overrideRules = [])
    {
        if (\PHP_VERSION_ID < $ruleSet->targetPhpVersion()) {
            throw new \RuntimeException(\sprintf(
                'Current PHP version "%s is less than targeted PHP version "%s".',
                \PHP_VERSION_ID,
                $ruleSet->targetPhpVersion()
            ));
        }

        $config = new Config($ruleSet->name());

        $config->setRiskyAllowed(true);
        $config->setRules(\array_merge(
            $ruleSet->rules(),
            $overrideRules
        ));

        return $config;
    }
public static function fromRuleSet ( RuleSet $ ruleSet , array $ overrideRules = [ ] ) { if ( \ PHP_VERSION_ID < $ ruleSet -> targetPhpVersion ( ) ) { throw new \ RuntimeException ( \ sprintf ( 'Current PHP version "%s is less than targeted PHP version "%s".' , \ PHP_VERSION_ID , $ ruleSet -> targetPhpVersion ( ) ) ) ; } $ config = new Config ( $ ruleSet -> name ( ) ) ; $ config -> setRiskyAllowed ( true ) ; $ config -> setRules ( \ array_merge ( $ ruleSet -> rules ( ) , $ overrideRules ) ) ; return $ config ; }
Creates a configuration based on a rule set.

@param RuleSet $ruleSet
@param array   $overrideRules

@throws \RuntimeException

@return Config
Creates a configuration based on a rule set .