original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Ensure that the given claims array is keyed by the claim name.
  
  @param  mixed  $items
  
  @return array
docstring_tokens: Ensure that the given claims array is keyed by the claim name .