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

        return new FixerConfigurationResolver([
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('sort_algorithm', 'whether the statements should be sorted alphabetically or by length, or not sorted'),
                'sortAlgorithm'
            ))
                ->setAllowedValues($this->supportedSortAlgorithms)
                ->setDefault(self::SORT_ALPHA)
                ->getOption(),
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('imports_order', 'Defines the order of import types.'),
                'importsOrder'
            ))
                ->setAllowedTypes(['array', 'null'])
                ->setAllowedValues([static function ($value) use ($supportedSortTypes) {
                    if (null !== $value) {
                        $missing = array_diff($supportedSortTypes, $value);
                        if (\count($missing)) {
                            throw new InvalidOptionsException(sprintf(
                                'Missing sort %s "%s".',
                                1 === \count($missing) ? 'type' : 'types',
                                implode('", "', $missing)
                            ));
                        }

                        $unknown = array_diff($value, $supportedSortTypes);
                        if (\count($unknown)) {
                            throw new InvalidOptionsException(sprintf(
                                'Unknown sort %s "%s".',
                                1 === \count($unknown) ? 'type' : 'types',
                                implode('", "', $unknown)
                            ));
                        }
                    }

                    return true;
                }])
                ->setDefault(null)
                ->getOption(),
        ]);
    }
protected function createConfigurationDefinition()
    {
        $supportedSortTypes = $this->supportedSortTypes;

        return new FixerConfigurationResolver([
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('sort_algorithm', 'whether the statements should be sorted alphabetically or by length, or not sorted'),
                'sortAlgorithm'
            ))
                ->setAllowedValues($this->supportedSortAlgorithms)
                ->setDefault(self::SORT_ALPHA)
                ->getOption(),
            (new AliasedFixerOptionBuilder(
                new FixerOptionBuilder('imports_order', 'Defines the order of import types.'),
                'importsOrder'
            ))
                ->setAllowedTypes(['array', 'null'])
                ->setAllowedValues([static function ($value) use ($supportedSortTypes) {
                    if (null !== $value) {
                        $missing = array_diff($supportedSortTypes, $value);
                        if (\count($missing)) {
                            throw new InvalidOptionsException(sprintf(
                                'Missing sort %s "%s".',
                                1 === \count($missing) ? 'type' : 'types',
                                implode('", "', $missing)
                            ));
                        }

                        $unknown = array_diff($value, $supportedSortTypes);
                        if (\count($unknown)) {
                            throw new InvalidOptionsException(sprintf(
                                'Unknown sort %s "%s".',
                                1 === \count($unknown) ? 'type' : 'types',
                                implode('", "', $unknown)
                            ));
                        }
                    }

                    return true;
                }])
                ->setDefault(null)
                ->getOption(),
        ]);
    }
protected function createConfigurationDefinition ( ) { $ supportedSortTypes = $ this -> supportedSortTypes ; return new FixerConfigurationResolver ( [ ( new AliasedFixerOptionBuilder ( new FixerOptionBuilder ( 'sort_algorithm' , 'whether the statements should be sorted alphabetically or by length, or not sorted' ) , 'sortAlgorithm' ) ) -> setAllowedValues ( $ this -> supportedSortAlgorithms ) -> setDefault ( self :: SORT_ALPHA ) -> getOption ( ) , ( new AliasedFixerOptionBuilder ( new FixerOptionBuilder ( 'imports_order' , 'Defines the order of import types.' ) , 'importsOrder' ) ) -> setAllowedTypes ( [ 'array' , 'null' ] ) -> setAllowedValues ( [ static function ( $ value ) use ( $ supportedSortTypes ) { if ( null !== $ value ) { $ missing = array_diff ( $ supportedSortTypes , $ value ) ; if ( \ count ( $ missing ) ) { throw new InvalidOptionsException ( sprintf ( 'Missing sort %s "%s".' , 1 === \ count ( $ missing ) ? 'type' : 'types' , implode ( '", "' , $ missing ) ) ) ; } $ unknown = array_diff ( $ value , $ supportedSortTypes ) ; if ( \ count ( $ unknown ) ) { throw new InvalidOptionsException ( sprintf ( 'Unknown sort %s "%s".' , 1 === \ count ( $ unknown ) ? 'type' : 'types' , implode ( '", "' , $ unknown ) ) ) ; } } return true ; } ] ) -> setDefault ( null ) -> getOption ( ) , ] ) ; }
{@inheritdoc}
{