protected function findCommand(): void
    {
        if (!isset($this->args[0])) {
            return;
        }

        $newArgs = [];

        foreach ($this->args as $key => $value) {
            if ($key === 0) {
                $this->command = \trim($value);
            } elseif (\is_int($key)) {
                $newArgs[] = $value;
            } else {
                $newArgs[$key] = $value;
            }
        }

        $this->args = $newArgs;
    }
protected function findCommand(): void
    {
        if (!isset($this->args[0])) {
            return;
        }

        $newArgs = [];

        foreach ($this->args as $key => $value) {
            if ($key === 0) {
                $this->command = \trim($value);
            } elseif (\is_int($key)) {
                $newArgs[] = $value;
            } else {
                $newArgs[$key] = $value;
            }
        }

        $this->args = $newArgs;
    }
protected function findCommand ( ) : void { if ( ! isset ( $ this -> args [ 0 ] ) ) { return ; } $ newArgs = [ ] ; foreach ( $ this -> args as $ key => $ value ) { if ( $ key === 0 ) { $ this -> command = \ trim ( $ value ) ; } elseif ( \ is_int ( $ key ) ) { $ newArgs [ ] = $ value ; } else { $ newArgs [ $ key ] = $ value ; } } $ this -> args = $ newArgs ; }
find command name. it is first argument.
find command name . it is first argument .