From 4d7e0e3c75ab8328f78f0f2dc5bc418bdd053ea9 Mon Sep 17 00:00:00 2001 From: Jonathan VUILLEMIN Date: Thu, 1 Apr 2021 12:06:15 +0200 Subject: [PATCH] fix: fixed code style --- .../MembershipServiceServerRequestHandler.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Service/Server/Handler/MembershipServiceServerRequestHandler.php b/src/Service/Server/Handler/MembershipServiceServerRequestHandler.php index 238bd43..79a52b5 100644 --- a/src/Service/Server/Handler/MembershipServiceServerRequestHandler.php +++ b/src/Service/Server/Handler/MembershipServiceServerRequestHandler.php @@ -87,7 +87,7 @@ public function handleServiceRequest( ): ResponseInterface { parse_str($request->getUri()->getQuery(), $parameters); - $rlId = $parameters['rlid'] ?? null; + $resourceLinkIdentifier = $parameters['rlid'] ?? null; $role = $parameters['role'] ?? null; $limit = array_key_exists('limit', $parameters) ? intval($parameters['limit']) @@ -96,22 +96,20 @@ public function handleServiceRequest( ? intval($parameters['offset']) : null; - if (null !== $rlId) { - $membership = $this->builder->buildResourceLinkMembership( + $membership = null !== $resourceLinkIdentifier + ? $this->builder->buildResourceLinkMembership( $registration, - $rlId, + $resourceLinkIdentifier, $role, $limit, $offset - ); - } else { - $membership = $this->builder->buildContextMembership( + ) + : $this->builder->buildContextMembership( $registration, $role, $limit, $offset ); - } $responseBody = $this->serializer->serialize($membership); $responseHeaders = [