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;
    }
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;
    }
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 ; }
Formats an item ready for response

@param Item $item Resource item
@return array Formatted item data
Formats an item ready for response