src/TweedeGolf/Generator/Console/Questioner.php
public function set(Arguments $arguments, $property, $type, array $options = [])
    {
        $options = $this->validateAndUpdateOptions($options, $type);
        $constraints = [];
        if (is_array($this->constraints) && isset($this->constraints[$property])) {
            $constraints = $this->constraints[$property];
        }

        $options['constraints'] = $constraints;
        $options['property'] = $property;
        if ($options['default'] === null && $arguments->get($property, null) !== null) {
            $options['default'] = $arguments[$property];
        }

        $result = $this->ask($type, $options);

        $arguments[$property] = $result;
    }
public function set(Arguments $arguments, $property, $type, array $options = [])
    {
        $options = $this->validateAndUpdateOptions($options, $type);
        $constraints = [];
        if (is_array($this->constraints) && isset($this->constraints[$property])) {
            $constraints = $this->constraints[$property];
        }

        $options['constraints'] = $constraints;
        $options['property'] = $property;
        if ($options['default'] === null && $arguments->get($property, null) !== null) {
            $options['default'] = $arguments[$property];
        }

        $result = $this->ask($type, $options);

        $arguments[$property] = $result;
    }
public function set ( Arguments $ arguments , $ property , $ type , array $ options = [ ] ) { $ options = $ this -> validateAndUpdateOptions ( $ options , $ type ) ; $ constraints = [ ] ; if ( is_array ( $ this -> constraints ) && isset ( $ this -> constraints [ $ property ] ) ) { $ constraints = $ this -> constraints [ $ property ] ; } $ options [ 'constraints' ] = $ constraints ; $ options [ 'property' ] = $ property ; if ( $ options [ 'default' ] === null && $ arguments -> get ( $ property , null ) !== null ) { $ options [ 'default' ] = $ arguments [ $ property ] ; } $ result = $ this -> ask ( $ type , $ options ) ; $ arguments [ $ property ] = $ result ; }
Set the value of a property in arguments to the value interactively retrieved.
@param Arguments                 $arguments
@param string                    $property
@param string|InputTypeInterface $type
@param array                     $options
Set the value of a property in arguments to the value interactively retrieved .