src/ShellOption.php
public function getArray()
    {
        $options = [];

        if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
            return $options;
        }

        foreach ($this->values as $value) {
            $options[] = $this->flag();
            $options[] = $value;
        }

        if (empty($options)) {
            $options[] = $this->flag();
        }

        return $options;
    }
public function getArray()
    {
        $options = [];

        if ($this->isDisabled() || $this->canHaveValue() && empty($this->values)) {
            return $options;
        }

        foreach ($this->values as $value) {
            $options[] = $this->flag();
            $options[] = $value;
        }

        if (empty($options)) {
            $options[] = $this->flag();
        }

        return $options;
    }
public function getArray ( ) { $ options = [ ] ; if ( $ this -> isDisabled ( ) || $ this -> canHaveValue ( ) && empty ( $ this -> values ) ) { return $ options ; } foreach ( $ this -> values as $ value ) { $ options [ ] = $ this -> flag ( ) ; $ options [ ] = $ value ; } if ( empty ( $ options ) ) { $ options [ ] = $ this -> flag ( ) ; } return $ options ; }
Get the option and its values as an array.

@return array
Get the option and its values as an array .