protected function parseRequestArguments(): void
    {
        // Iterate through the request arguments
        foreach ($this->getRequestArguments() as $argument) {
            // Split the string on an equal sign
            $exploded = explode('=', $argument);

            $key   = $exploded[0];
            $value = $exploded[1] ?? true;
            $type  = 'arguments';

            // If the key has double dash it is a long option
            if (strpos($key, '--') !== false) {
                $type = 'longOptions';
            } // If the key has a single dash it is a short option
            elseif (strpos($key, '-') !== false) {
                $type = 'shortOptions';
            }

            // If the key is already set
            if (isset($this->{$type}[$key])) {
                // If the key isn't already an array
                if (! \is_array($this->{$type}[$key])) {
                    // Make it an array with the current value
                    $this->{$type}[$key] = [$this->{$type}[$key]];
                }

                // Add the next value to the array
                $this->{$type}[$key][] = $value;

                continue;
            }

            // Set the key value pair
            $this->{$type}[$key] = $value;
        }
    }
protected function parseRequestArguments(): void
    {
        // Iterate through the request arguments
        foreach ($this->getRequestArguments() as $argument) {
            // Split the string on an equal sign
            $exploded = explode('=', $argument);

            $key   = $exploded[0];
            $value = $exploded[1] ?? true;
            $type  = 'arguments';

            // If the key has double dash it is a long option
            if (strpos($key, '--') !== false) {
                $type = 'longOptions';
            } // If the key has a single dash it is a short option
            elseif (strpos($key, '-') !== false) {
                $type = 'shortOptions';
            }

            // If the key is already set
            if (isset($this->{$type}[$key])) {
                // If the key isn't already an array
                if (! \is_array($this->{$type}[$key])) {
                    // Make it an array with the current value
                    $this->{$type}[$key] = [$this->{$type}[$key]];
                }

                // Add the next value to the array
                $this->{$type}[$key][] = $value;

                continue;
            }

            // Set the key value pair
            $this->{$type}[$key] = $value;
        }
    }
protected function parseRequestArguments ( ) : void { // Iterate through the request arguments foreach ( $ this -> getRequestArguments ( ) as $ argument ) { // Split the string on an equal sign $ exploded = explode ( '=' , $ argument ) ; $ key = $ exploded [ 0 ] ; $ value = $ exploded [ 1 ] ?? true ; $ type = 'arguments' ; // If the key has double dash it is a long option if ( strpos ( $ key , '--' ) !== false ) { $ type = 'longOptions' ; } // If the key has a single dash it is a short option elseif ( strpos ( $ key , '-' ) !== false ) { $ type = 'shortOptions' ; } // If the key is already set if ( isset ( $ this -> { $ type } [ $ key ] ) ) { // If the key isn't already an array if ( ! \ is_array ( $ this -> { $ type } [ $ key ] ) ) { // Make it an array with the current value $ this -> { $ type } [ $ key ] = [ $ this -> { $ type } [ $ key ] ] ; } // Add the next value to the array $ this -> { $ type } [ $ key ] [ ] = $ value ; continue ; } // Set the key value pair $ this -> { $ type } [ $ key ] = $ value ; } }
Parse request arguments to split by options and arguments.

@return void
Parse request arguments to split by options and arguments .