From 507afc16d9a35a299d10083dcd1e3ae271b0e3c1 Mon Sep 17 00:00:00 2001
From: Nerea Enrique <nerea.enrique@gmail.com>
Date: Wed, 15 Jan 2025 09:00:51 +0100
Subject: [PATCH] fix: keep the return from the interface instead

---
 src/Security/UserClassBuilder.php                               | 2 +-
 .../fixtures/expected/UserEntityWithEmailAsIdentifier.php       | 1 -
 tests/Security/fixtures/expected/UserEntityWithPassword.php     | 1 -
 .../expected/UserEntityWithUser_IdentifierAsIdentifier.php      | 1 -
 tests/Security/fixtures/expected/UserEntityWithoutPassword.php  | 1 -
 .../fixtures/expected/UserModelWithEmailAsIdentifier.php        | 1 -
 tests/Security/fixtures/expected/UserModelWithPassword.php      | 1 -
 tests/Security/fixtures/expected/UserModelWithoutPassword.php   | 1 -
 8 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/Security/UserClassBuilder.php b/src/Security/UserClassBuilder.php
index e99af57dc..88f11d3af 100644
--- a/src/Security/UserClassBuilder.php
+++ b/src/Security/UserClassBuilder.php
@@ -132,7 +132,7 @@ private function addGetRoles(ClassSourceManipulator $manipulator, UserClassConfi
             'getRoles',
             'array',
             false,
-            ['@see UserInterface', '@return list<string>']
+            ['@see UserInterface']
         );
 
         // $roles = $this->roles
diff --git a/tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php b/tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php
index d053ec604..51129bb40 100644
--- a/tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php
+++ b/tests/Security/fixtures/expected/UserEntityWithEmailAsIdentifier.php
@@ -59,7 +59,6 @@ public function getUserIdentifier(): string
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserEntityWithPassword.php b/tests/Security/fixtures/expected/UserEntityWithPassword.php
index ae4158d56..c2f15e33c 100644
--- a/tests/Security/fixtures/expected/UserEntityWithPassword.php
+++ b/tests/Security/fixtures/expected/UserEntityWithPassword.php
@@ -54,7 +54,6 @@ public function setUserIdentifier(string $userIdentifier): static
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php b/tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php
index 709982a4a..4c6ee99f6 100644
--- a/tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php
+++ b/tests/Security/fixtures/expected/UserEntityWithUser_IdentifierAsIdentifier.php
@@ -54,7 +54,6 @@ public function setUserIdentifier(string $user_identifier): static
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserEntityWithoutPassword.php b/tests/Security/fixtures/expected/UserEntityWithoutPassword.php
index a1deca0f6..645b58be5 100644
--- a/tests/Security/fixtures/expected/UserEntityWithoutPassword.php
+++ b/tests/Security/fixtures/expected/UserEntityWithoutPassword.php
@@ -47,7 +47,6 @@ public function setUserIdentifier(string $userIdentifier): static
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php b/tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php
index d08e3b66e..e38540356 100644
--- a/tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php
+++ b/tests/Security/fixtures/expected/UserModelWithEmailAsIdentifier.php
@@ -43,7 +43,6 @@ public function getUserIdentifier(): string
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserModelWithPassword.php b/tests/Security/fixtures/expected/UserModelWithPassword.php
index fd2e86898..0e8cb774c 100644
--- a/tests/Security/fixtures/expected/UserModelWithPassword.php
+++ b/tests/Security/fixtures/expected/UserModelWithPassword.php
@@ -38,7 +38,6 @@ public function setUserIdentifier(string $userIdentifier): static
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {
diff --git a/tests/Security/fixtures/expected/UserModelWithoutPassword.php b/tests/Security/fixtures/expected/UserModelWithoutPassword.php
index 355721786..b85c7cb27 100644
--- a/tests/Security/fixtures/expected/UserModelWithoutPassword.php
+++ b/tests/Security/fixtures/expected/UserModelWithoutPassword.php
@@ -32,7 +32,6 @@ public function setUserIdentifier(string $userIdentifier): static
 
     /**
      * @see UserInterface
-     * @return list<string>
      */
     public function getRoles(): array
     {