From 5132ebccd90100476295cf7d14b7e54500ca672b Mon Sep 17 00:00:00 2001
From: Jean-Philippe Metivier <jean-philippe.metivier@unicaen.fr>
Date: Mon, 28 Feb 2022 14:40:36 +0100
Subject: [PATCH] Ajout d'un accesseur pour le UserContext

---
 .../Service/Traits/UserContextServiceAwareTrait.php   | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/UnicaenAuthentification/Service/Traits/UserContextServiceAwareTrait.php b/src/UnicaenAuthentification/Service/Traits/UserContextServiceAwareTrait.php
index 6a56a0b..dda6f4e 100644
--- a/src/UnicaenAuthentification/Service/Traits/UserContextServiceAwareTrait.php
+++ b/src/UnicaenAuthentification/Service/Traits/UserContextServiceAwareTrait.php
@@ -18,10 +18,15 @@ trait UserContextServiceAwareTrait
      * @param UserContext $serviceUserContext
      * @return self
      */
-    public function setServiceUserContext(UserContext $serviceUserContext)
+    public function setServiceUserContext(UserContext $serviceUserContext) : UserContext
     {
         $this->serviceUserContext = $serviceUserContext;
+        return $this->serviceUserContext;
+    }
 
-        return $this;
+    public function getServiceUserContext() : UserContext
+    {
+        return $this->serviceUserContext;
     }
-}
\ No newline at end of file
+
+}
-- 
GitLab