src/FixerConfiguration/FixerConfigurationResolverRootless.php
public function resolve(array $options)
    {
        if (!empty($options) && !\array_key_exists($this->root, $options)) {
            $names = array_map(
                function (FixerOptionInterface $option) {
                    return $option->getName();
                },
                $this->resolver->getOptions()
            );

            $passedNames = array_keys($options);

            if (!empty(array_diff($passedNames, $names))) {
                $message = "Passing \"{$this->root}\" at the root of the configuration for rule \"{$this->fixerName}\" is deprecated and will not be supported in 3.0, use \"{$this->root}\" => array(...) option instead.";

                if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
                    throw new \RuntimeException("{$message}. This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set.");
                }

                @trigger_error($message, E_USER_DEPRECATED);

                $options = [$this->root => $options];
            }
        }

        return $this->resolver->resolve($options);
    }
public function resolve(array $options)
    {
        if (!empty($options) && !\array_key_exists($this->root, $options)) {
            $names = array_map(
                function (FixerOptionInterface $option) {
                    return $option->getName();
                },
                $this->resolver->getOptions()
            );

            $passedNames = array_keys($options);

            if (!empty(array_diff($passedNames, $names))) {
                $message = "Passing \"{$this->root}\" at the root of the configuration for rule \"{$this->fixerName}\" is deprecated and will not be supported in 3.0, use \"{$this->root}\" => array(...) option instead.";

                if (getenv('PHP_CS_FIXER_FUTURE_MODE')) {
                    throw new \RuntimeException("{$message}. This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set.");
                }

                @trigger_error($message, E_USER_DEPRECATED);

                $options = [$this->root => $options];
            }
        }

        return $this->resolver->resolve($options);
    }
public function resolve ( array $ options ) { if ( ! empty ( $ options ) && ! \ array_key_exists ( $ this -> root , $ options ) ) { $ names = array_map ( function ( FixerOptionInterface $ option ) { return $ option -> getName ( ) ; } , $ this -> resolver -> getOptions ( ) ) ; $ passedNames = array_keys ( $ options ) ; if ( ! empty ( array_diff ( $ passedNames , $ names ) ) ) { $ message = "Passing \"{$this->root}\" at the root of the configuration for rule \"{$this->fixerName}\" is deprecated and will not be supported in 3.0, use \"{$this->root}\" => array(...) option instead." ; if ( getenv ( 'PHP_CS_FIXER_FUTURE_MODE' ) ) { throw new \ RuntimeException ( "{$message}. This check was performed as `PHP_CS_FIXER_FUTURE_MODE` env var is set." ) ; } @ trigger_error ( $ message , E_USER_DEPRECATED ) ; $ options = [ $ this -> root => $ options ] ; } } return $ this -> resolver -> resolve ( $ options ) ; }
{@inheritdoc}
{