@@ -10,15 +10,17 @@ class RoleMultiSelectDiscordType extends AbstractDiscordType
1010{
1111 /**
1212 * Liste von Discord-Bots
13+ *
14+ * @var DiscordBotList
1315 */
14- protected DiscordBotList $ discordBotList ;
16+ protected $ discordBotList ;
1517
1618 /**
1719 * Liste von Server-Rollen
1820 *
1921 * @var array<int, mixed>
2022 */
21- protected array $ guildRoles ;
23+ protected $ guildRoles ;
2224
2325 public function getFormElement (mixed $ value ): string
2426 {
@@ -88,10 +90,12 @@ public function getData(mixed $newValue): string
8890
8991 /**
9092 * gibt Liste von Discord-Bots zurück
93+ *
94+ * @return DiscordBotList
9195 */
92- protected function getDiscordBotList (): DiscordBotList
96+ protected function getDiscordBotList ()
9397 {
94- if (! isset ( $ this ->discordBotList ) ) {
98+ if ($ this ->discordBotList === null ) {
9599 $ this ->discordBotList = new DiscordBotList ();
96100 $ this ->discordBotList ->sqlOrderBy = 'botName ASC ' ;
97101 $ this ->discordBotList ->readObjects ();
@@ -105,9 +109,9 @@ protected function getDiscordBotList(): DiscordBotList
105109 *
106110 * @return array<int, mixed>
107111 */
108- protected function getGuildRoles (): array
112+ protected function getGuildRoles ()
109113 {
110- if (! isset ( $ this ->guildRoles ) ) {
114+ if ($ this ->guildRoles === null ) {
111115 foreach ($ this ->getDiscordBotList () as $ discordBot ) {
112116 $ discordApi = $ discordBot ->getDiscordApi ();
113117 $ this ->guildRoles [$ discordBot ->botID ] = $ discordApi ->getGuildRoles ();
0 commit comments