Mmoreram\PHPFormatter\Command\UseSortCommand::createUseSorter PHP Method

createUseSorter() private method

Create UseSorter Object given a configuration.
private createUseSorter ( array $options ) : UseSorter
$options array Options
return Mmoreram\PHPFormatter\Sorter\UseSorter Use sorter instance
    private function createUseSorter(array $options)
    {
        /**
         * Creates the new UseSorter file, given config values.
         */
        $useSorter = new UseSorter();
        $useSorter->setGroups($options['group'])->setGroupType($options['group-type'])->setGroupSkipEmpty($options['group-skip-empty'])->setSortType($options['sort-type'])->setSortDirection($options['sort-direction']);
        return $useSorter;
    }