private function normalize(array $matches) : array
    {
        $keys = $matches[1];
        $values = $matches[2];

        $return = [];

        foreach ($keys as $i => $key) {
            $key = strtolower(trim($key));

            if ($key == 'mode') {
                $value = strtolower($values[$i]);
            } else {
                $value = array_map(
                    function ($el) {
                        return trim($el, ', ');
                    },
                    explode(',', $values[$i])
                );
            }
            $return[$key] = $value;
        }

        return $return;
    }
private function normalize(array $matches) : array
    {
        $keys = $matches[1];
        $values = $matches[2];

        $return = [];

        foreach ($keys as $i => $key) {
            $key = strtolower(trim($key));

            if ($key == 'mode') {
                $value = strtolower($values[$i]);
            } else {
                $value = array_map(
                    function ($el) {
                        return trim($el, ', ');
                    },
                    explode(',', $values[$i])
                );
            }
            $return[$key] = $value;
        }

        return $return;
    }
private function normalize ( array $ matches ) : array { $ keys = $ matches [ 1 ] ; $ values = $ matches [ 2 ] ; $ return = [ ] ; foreach ( $ keys as $ i => $ key ) { $ key = strtolower ( trim ( $ key ) ) ; if ( $ key == 'mode' ) { $ value = strtolower ( $ values [ $ i ] ) ; } else { $ value = array_map ( function ( $ el ) { return trim ( $ el , ', ' ) ; } , explode ( ',' , $ values [ $ i ] ) ) ; } $ return [ $ key ] = $ value ; } return $ return ; }
Turns a pregexed array of auth blocks into a decent array

Internal use only - @see Rauth::extractAuth

@internal
@param array $matches
@return array
Turns a pregexed array of auth blocks into a decent array