private function flatten($arguments, array &$list)
    {
        foreach ($arguments as $key => $item) {
            if (!is_numeric($key)) {
                $list[] = $key;
            }

            if (is_scalar($item)) {
                $list[] = strval($item);
            } elseif (null === $item) {
                $list[] = '<null>';
            } else {
                $this->flatten($item, $list);
            }
        }
    }
private function flatten($arguments, array &$list)
    {
        foreach ($arguments as $key => $item) {
            if (!is_numeric($key)) {
                $list[] = $key;
            }

            if (is_scalar($item)) {
                $list[] = strval($item);
            } elseif (null === $item) {
                $list[] = '<null>';
            } else {
                $this->flatten($item, $list);
            }
        }
    }
private function flatten ( $ arguments , array & $ list ) { foreach ( $ arguments as $ key => $ item ) { if ( ! is_numeric ( $ key ) ) { $ list [ ] = $ key ; } if ( is_scalar ( $ item ) ) { $ list [ ] = strval ( $ item ) ; } elseif ( null === $ item ) { $ list [ ] = '<null>' ; } else { $ this -> flatten ( $ item , $ list ) ; } } }
Flatten arguments to single dimension array.

@param array $arguments An array of command arguments
@param array $list      Holder of results
Flatten arguments to single dimension array .