public static function getFieldValue(InputInterface $input, $fieldName)
    {
        $value = null;

        if ($input->hasArgument($fieldName)) {
            $value = $input->getArgument($fieldName);
        } elseif ($input->hasOption($fieldName)) {
            $value = $input->getOption($fieldName);
        }

        return $value;
    }
public static function getFieldValue(InputInterface $input, $fieldName)
    {
        $value = null;

        if ($input->hasArgument($fieldName)) {
            $value = $input->getArgument($fieldName);
        } elseif ($input->hasOption($fieldName)) {
            $value = $input->getOption($fieldName);
        }

        return $value;
    }
public static function getFieldValue ( InputInterface $ input , $ fieldName ) { $ value = null ; if ( $ input -> hasArgument ( $ fieldName ) ) { $ value = $ input -> getArgument ( $ fieldName ) ; } elseif ( $ input -> hasOption ( $ fieldName ) ) { $ value = $ input -> getOption ( $ fieldName ) ; } return $ value ; }
Get field value in console input.

@param InputInterface $input     The console input
@param string         $fieldName The field name

@return mixed|null
Get field value in console input .