private function sanitizeClaims($items)
    {
        $claims = [];
        foreach ($items as $key => $value) {
            if (! is_string($key) && $value instanceof Claim) {
                $key = $value->getName();
            }

            $claims[$key] = $value;
        }

        return $claims;
    }
private function sanitizeClaims($items)
    {
        $claims = [];
        foreach ($items as $key => $value) {
            if (! is_string($key) && $value instanceof Claim) {
                $key = $value->getName();
            }

            $claims[$key] = $value;
        }

        return $claims;
    }
private function sanitizeClaims ( $ items ) { $ claims = [ ] ; foreach ( $ items as $ key => $ value ) { if ( ! is_string ( $ key ) && $ value instanceof Claim ) { $ key = $ value -> getName ( ) ; } $ claims [ $ key ] = $ value ; } return $ claims ; }
Ensure that the given claims array is keyed by the claim name.

@param  mixed  $items

@return array
Ensure that the given claims array is keyed by the claim name .