diff --git a/src/Controller/EntityResource.php b/src/Controller/EntityResource.php index d964bf9..f436fd8 100644 --- a/src/Controller/EntityResource.php +++ b/src/Controller/EntityResource.php @@ -124,8 +124,6 @@ class EntityResource { /** * Gets the individual entity. * - * @param \Drupal\jsonapi\ResourceType\ResourceType $resource_type - * The base JSON API resource type for the request to be served. * @param \Drupal\Core\Entity\EntityInterface $entity * The loaded entity. * @@ -135,7 +133,7 @@ class EntityResource { * @throws \Drupal\jsonapi\Exception\EntityAccessDeniedHttpException * Thrown when access to the entity is not allowed. */ - public function getIndividual(ResourceType $resource_type, EntityInterface $entity) { + public function getIndividual(EntityInterface $entity) { $entity = static::getAccessCheckedEntity($entity); if ($entity instanceof EntityAccessDeniedHttpException) { throw $entity; @@ -305,17 +303,13 @@ class EntityResource { /** * Deletes an individual entity. * - * @param \Drupal\jsonapi\ResourceType\ResourceType $resource_type - * The base JSON API resource type for the request to be served. * @param \Drupal\Core\Entity\EntityInterface $entity * The loaded entity. - * @param \Symfony\Component\HttpFoundation\Request $request - * The request object. * * @return \Drupal\jsonapi\ResourceResponse * The response. */ - public function deleteIndividual(ResourceType $resource_type, EntityInterface $entity, Request $request) { + public function deleteIndividual(EntityInterface $entity) { $entity->delete(); return new ResourceResponse(NULL, 204); } @@ -454,15 +448,13 @@ class EntityResource { * The requested entity. * @param string $related * The related field name. - * @param \Symfony\Component\HttpFoundation\Request $request - * The request object. * @param int $response_code * The response code. Defaults to 200. * * @return \Drupal\jsonapi\ResourceResponse * The response. */ - public function getRelationship(ResourceType $resource_type, FieldableEntityInterface $entity, $related, Request $request, $response_code = 200) { + public function getRelationship(ResourceType $resource_type, FieldableEntityInterface $entity, $related, $response_code = 200) { /* @var \Drupal\Core\Field\FieldItemListInterface $field_list */ $field_list = $entity->get($resource_type->getInternalName($related)); $response = $this->buildWrappedResponse($field_list, $response_code);