PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer::configure PHP Method

configure() public method

Note: the 'const' configuration is only valid when running on PHP >= 7.1 Use 'null' for default configuration ('property', 'method').
public configure ( array $configuration = null )
$configuration array
    public function configure(array $configuration = null)
    {
        if (null === $configuration) {
            $this->configuration = self::$defaultConfiguration;
            return;
        }
        $this->configuration = array();
        foreach ($configuration as $item) {
            if (!is_string($item)) {
                throw new InvalidFixerConfigurationException($this->getName(), sprintf('Expected string got "%s".', is_object($item) ? get_class($item) : gettype($item)));
            }
            if (!in_array($item, $this->options, true)) {
                throw new InvalidFixerConfigurationException($this->getName(), sprintf('Unknown configuration item "%s", expected any of "%s".', $item, implode('", "', $this->options)));
            }
            if ('const' === $item && PHP_VERSION_ID < 70100) {
                throw new InvalidFixerConfigurationException($this->getName(), sprintf('Invalid configuration item "%s" for PHP "%s".', $item, phpversion()));
            }
            $this->configuration[] = $item;
        }
    }