original_string: protected function encodeSingleResource(
          \FreeFW\Interfaces\ApiResponseInterface $p_api_response
      ) : \FreeFW\JsonApi\V1\Model\ResourceObject {
          $resource = new \FreeFW\JsonApi\V1\Model\ResourceObject(
              $p_api_response->getApiType(),
              $p_api_response->getApiId()
          );
          $fields = $p_api_response->getApiAttributes();
          if ($fields) {
              $attributes = new \FreeFW\JsonApi\V1\Model\AttributesObject($fields);
              $resource->setAttributes($attributes);
          }
          return $resource;
      }
code: protected function encodeSingleResource(
          \FreeFW\Interfaces\ApiResponseInterface $p_api_response
      ) : \FreeFW\JsonApi\V1\Model\ResourceObject {
          $resource = new \FreeFW\JsonApi\V1\Model\ResourceObject(
              $p_api_response->getApiType(),
              $p_api_response->getApiId()
          );
          $fields = $p_api_response->getApiAttributes();
          if ($fields) {
              $attributes = new \FreeFW\JsonApi\V1\Model\AttributesObject($fields);
              $resource->setAttributes($attributes);
          }
          return $resource;
      }
code_tokens: protected function encodeSingleResource ( \ FreeFW \ Interfaces \ ApiResponseInterface $ p_api_response ) : \ FreeFW \ JsonApi \ V1 \ Model \ ResourceObject { $ resource = new \ FreeFW \ JsonApi \ V1 \ Model \ ResourceObject ( $ p_api_response -> getApiType ( ) , $ p_api_response -> getApiId ( ) ) ; $ fields = $ p_api_response -> getApiAttributes ( ) ; if ( $ fields ) { $ attributes = new \ FreeFW \ JsonApi \ V1 \ Model \ AttributesObject ( $ fields ) ; $ resource -> setAttributes ( $ attributes ) ; } return $ resource ; }
docstring: Encode single resource
  
  @param \FreeFW\Interfaces\ApiResponseInterface $p_api_response
  
  @return \FreeFW\JsonApi\V1\Model\ResourceObject
docstring_tokens: Encode single resource