private function getConfigReader(): OptionsReader
    {
        $command = $this;

        return new class($command) extends OptionsReader {
            /**
             * A OptionDumpCommand instance.
             *
             * @var \Viserio\Component\OptionsResolver\Command\OptionDumpCommand
             */
            private $command;

            /**
             * @param \Viserio\Component\OptionsResolver\Command\OptionDumpCommand $command
             */
            public function __construct(OptionDumpCommand $command)
            {
                $this->command = $command;
            }

            /**
             * Read the mandatory options and ask for the value.
             *
             * @param string $className
             * @param array  $dimensions
             * @param array  $mandatoryOptions
             *
             * @return array
             */
            protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array
            {
                $options = [];

                foreach ($mandatoryOptions as $key => $mandatoryOption) {
                    if (! \is_scalar($mandatoryOption)) {
                        $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]);

                        continue;
                    }

                    $options[$mandatoryOption] = $this->command->ask(
                        \sprintf(
                            '%s: Please enter the following mandatory value for [%s]',
                            $className,
                            \implode('.', $dimensions) . '.' . $mandatoryOption
                        )
                    );
                }

                return $options;
            }
        };
    }
private function getConfigReader(): OptionsReader
    {
        $command = $this;

        return new class($command) extends OptionsReader {
            /**
             * A OptionDumpCommand instance.
             *
             * @var \Viserio\Component\OptionsResolver\Command\OptionDumpCommand
             */
            private $command;

            /**
             * @param \Viserio\Component\OptionsResolver\Command\OptionDumpCommand $command
             */
            public function __construct(OptionDumpCommand $command)
            {
                $this->command = $command;
            }

            /**
             * Read the mandatory options and ask for the value.
             *
             * @param string $className
             * @param array  $dimensions
             * @param array  $mandatoryOptions
             *
             * @return array
             */
            protected function readMandatoryOption(string $className, array $dimensions, array $mandatoryOptions): array
            {
                $options = [];

                foreach ($mandatoryOptions as $key => $mandatoryOption) {
                    if (! \is_scalar($mandatoryOption)) {
                        $options[$key] = $this->readMandatoryOption($className, $dimensions, $mandatoryOptions[$key]);

                        continue;
                    }

                    $options[$mandatoryOption] = $this->command->ask(
                        \sprintf(
                            '%s: Please enter the following mandatory value for [%s]',
                            $className,
                            \implode('.', $dimensions) . '.' . $mandatoryOption
                        )
                    );
                }

                return $options;
            }
        };
    }
private function getConfigReader ( ) : OptionsReader { $ command = $ this ; return new class ( $ command ) extends OptionsReader { /**
             * A OptionDumpCommand instance.
             *
             * @var \Viserio\Component\OptionsResolver\Command\OptionDumpCommand
             */ private $ command ; /**
             * @param \Viserio\Component\OptionsResolver\Command\OptionDumpCommand $command
             */ public function __construct ( OptionDumpCommand $ command ) { $ this -> command = $ command ; } /**
             * Read the mandatory options and ask for the value.
             *
             * @param string $className
             * @param array  $dimensions
             * @param array  $mandatoryOptions
             *
             * @return array
             */ protected function readMandatoryOption ( string $ className , array $ dimensions , array $ mandatoryOptions ) : array { $ options = [ ] ; foreach ( $ mandatoryOptions as $ key => $ mandatoryOption ) { if ( ! \ is_scalar ( $ mandatoryOption ) ) { $ options [ $ key ] = $ this -> readMandatoryOption ( $ className , $ dimensions , $ mandatoryOptions [ $ key ] ) ; continue ; } $ options [ $ mandatoryOption ] = $ this -> command -> ask ( \ sprintf ( '%s: Please enter the following mandatory value for [%s]' , $ className , \ implode ( '.' , $ dimensions ) . '.' . $ mandatoryOption ) ) ; } return $ options ; } } ; }
Get a modified OptionsReader instance.

@return \Viserio\Component\OptionsResolver\Command\OptionsReader
Get a modified OptionsReader instance .