original_string: private function getFormattedItem(Item $item)
      {
          $data = [
              'type'       => $this->getFormattedName($item->getTransformer()),
              'id'         => $item->getData()->id,
              'attributes' => $item->sanitize(),
          ];
  
          if ($links = $item->getLinks()) {
              $data['links'] = $links;
          }
  
          return $data;
      }
code: private function getFormattedItem(Item $item)
      {
          $data = [
              'type'       => $this->getFormattedName($item->getTransformer()),
              'id'         => $item->getData()->id,
              'attributes' => $item->sanitize(),
          ];
  
          if ($links = $item->getLinks()) {
              $data['links'] = $links;
          }
  
          return $data;
      }
code_tokens: private function getFormattedItem ( Item $ item ) { $ data = [ 'type' => $ this -> getFormattedName ( $ item -> getTransformer ( ) ) , 'id' => $ item -> getData ( ) -> id , 'attributes' => $ item -> sanitize ( ) , ] ; if ( $ links = $ item -> getLinks ( ) ) { $ data [ 'links' ] = $ links ; } return $ data ; }
docstring: Formats an item ready for response
  
  @param Item $item Resource item
  @return array Formatted item data
docstring_tokens: Formats an item ready for response