private function aggregate($type, $cb = null)
    {
        $data = [];

        $this->recursive(
            $this->storage,
            function ($value) use (& $data) {
                if (is_numeric($value)) {
                    $data[] = $value;
                }
            }
        );

        $r = call_user_func_array($type, $data);

        if (is_callable($cb)) {
            call_user_func_array($cb, [$r]);
        }

        return $r;
    }
private function aggregate($type, $cb = null)
    {
        $data = [];

        $this->recursive(
            $this->storage,
            function ($value) use (& $data) {
                if (is_numeric($value)) {
                    $data[] = $value;
                }
            }
        );

        $r = call_user_func_array($type, $data);

        if (is_callable($cb)) {
            call_user_func_array($cb, [$r]);
        }

        return $r;
    }
private function aggregate ( $ type , $ cb = null ) { $ data = [ ] ; $ this -> recursive ( $ this -> storage , function ( $ value ) use ( & $ data ) { if ( is_numeric ( $ value ) ) { $ data [ ] = $ value ; } } ) ; $ r = call_user_func_array ( $ type , $ data ) ; if ( is_callable ( $ cb ) ) { call_user_func_array ( $ cb , [ $ r ] ) ; } return $ r ; }
Aggregate Execute max|min

@param callable $cb
@param string   $type

@return number
Aggregate Execute max|min