protected function createConfigurationDefinition()
    {
        $fixerName = $this->getName();

        return new FixerConfigurationResolver([
            (new FixerOptionBuilder('header', 'Proper header content.'))
                ->setAllowedTypes(['string'])
                ->setNormalizer(static function (Options $options, $value) use ($fixerName) {
                    if ('' === trim($value)) {
                        return '';
                    }

                    if (false !== strpos($value, '*/')) {
                        throw new InvalidFixerConfigurationException($fixerName, 'Cannot use \'*/\' in header.');
                    }

                    return $value;
                })
                ->getOption(),
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('comment_type', 'Comment syntax type.'),
                'commentType'
            ))
                ->setAllowedValues([self::HEADER_PHPDOC, self::HEADER_COMMENT])
                ->setDefault(self::HEADER_COMMENT)
                ->getOption(),
            (new FixerOptionBuilder('location', 'The location of the inserted header.'))
                ->setAllowedValues(['after_open', 'after_declare_strict'])
                ->setDefault('after_declare_strict')
                ->getOption(),
            (new FixerOptionBuilder('separate', 'Whether the header should be separated from the file content with a new line.'))
                ->setAllowedValues(['both', 'top', 'bottom', 'none'])
                ->setDefault('both')
                ->getOption(),
        ]);
    }
protected function createConfigurationDefinition()
    {
        $fixerName = $this->getName();

        return new FixerConfigurationResolver([
            (new FixerOptionBuilder('header', 'Proper header content.'))
                ->setAllowedTypes(['string'])
                ->setNormalizer(static function (Options $options, $value) use ($fixerName) {
                    if ('' === trim($value)) {
                        return '';
                    }

                    if (false !== strpos($value, '*/')) {
                        throw new InvalidFixerConfigurationException($fixerName, 'Cannot use \'*/\' in header.');
                    }

                    return $value;
                })
                ->getOption(),
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('comment_type', 'Comment syntax type.'),
                'commentType'
            ))
                ->setAllowedValues([self::HEADER_PHPDOC, self::HEADER_COMMENT])
                ->setDefault(self::HEADER_COMMENT)
                ->getOption(),
            (new FixerOptionBuilder('location', 'The location of the inserted header.'))
                ->setAllowedValues(['after_open', 'after_declare_strict'])
                ->setDefault('after_declare_strict')
                ->getOption(),
            (new FixerOptionBuilder('separate', 'Whether the header should be separated from the file content with a new line.'))
                ->setAllowedValues(['both', 'top', 'bottom', 'none'])
                ->setDefault('both')
                ->getOption(),
        ]);
    }
protected function createConfigurationDefinition ( ) { $ fixerName = $ this -> getName ( ) ; return new FixerConfigurationResolver ( [ ( new FixerOptionBuilder ( 'header' , 'Proper header content.' ) ) -> setAllowedTypes ( [ 'string' ] ) -> setNormalizer ( static function ( Options $ options , $ value ) use ( $ fixerName ) { if ( '' === trim ( $ value ) ) { return '' ; } if ( false !== strpos ( $ value , '*/' ) ) { throw new InvalidFixerConfigurationException ( $ fixerName , 'Cannot use \'*/\' in header.' ) ; } return $ value ; } ) -> getOption ( ) , ( new AliasedFixerOptionBuilder ( new FixerOptionBuilder ( 'comment_type' , 'Comment syntax type.' ) , 'commentType' ) ) -> setAllowedValues ( [ self :: HEADER_PHPDOC , self :: HEADER_COMMENT ] ) -> setDefault ( self :: HEADER_COMMENT ) -> getOption ( ) , ( new FixerOptionBuilder ( 'location' , 'The location of the inserted header.' ) ) -> setAllowedValues ( [ 'after_open' , 'after_declare_strict' ] ) -> setDefault ( 'after_declare_strict' ) -> getOption ( ) , ( new FixerOptionBuilder ( 'separate' , 'Whether the header should be separated from the file content with a new line.' ) ) -> setAllowedValues ( [ 'both' , 'top' , 'bottom' , 'none' ] ) -> setDefault ( 'both' ) -> getOption ( ) , ] ) ; }
{@inheritdoc}
{