protected function prepareFooter(array $data)
    {
        $footer = [];

        foreach ($data as $date => $levels) {
            foreach ($levels as $level => $count) {
                if ( ! isset($footer[$level])) {
                    $footer[$level] = 0;
                }

                $footer[$level] += $count;
            }
        }

        return $footer;
    }
protected function prepareFooter(array $data)
    {
        $footer = [];

        foreach ($data as $date => $levels) {
            foreach ($levels as $level => $count) {
                if ( ! isset($footer[$level])) {
                    $footer[$level] = 0;
                }

                $footer[$level] += $count;
            }
        }

        return $footer;
    }
protected function prepareFooter ( array $ data ) { $ footer = [ ] ; foreach ( $ data as $ date => $ levels ) { foreach ( $ levels as $ level => $ count ) { if ( ! isset ( $ footer [ $ level ] ) ) { $ footer [ $ level ] = 0 ; } $ footer [ $ level ] += $ count ; } } return $ footer ; }
Prepare table footer.

@param  array  $data

@return array
Prepare table footer .