File tree Expand file tree Collapse file tree 6 files changed +44
-14
lines changed Expand file tree Collapse file tree 6 files changed +44
-14
lines changed Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
22<psalm
3- errorLevel =" 2 "
3+ errorLevel =" 1 "
44 cacheDirectory =" data/cache/.psalm_cache"
55 xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
66 xmlns =" https://getpsalm.org/schema/config"
Original file line number Diff line number Diff line change @@ -124,7 +124,8 @@ public function getIdentifier(): string
124124 return $ this ->getToken ();
125125 }
126126
127- public function setIdentifier (mixed $ identifier ): self
127+ /** @psalm-suppress MixedArgument */
128+ public function setIdentifier ($ identifier ): self
128129 {
129130 return $ this ->setToken ($ identifier );
130131 }
@@ -163,14 +164,20 @@ public function removeScope(OAuthScope $scope): self
163164 return $ this ;
164165 }
165166
166- public function getScopes (?Criteria $ criteria = null ): Collection
167+ /** @psalm-suppress MixedInferredReturnType */
168+ public function getScopes (?Criteria $ criteria = null ): array
167169 {
168170 if ($ criteria === null ) {
169- return $ this ->scopes ;
171+ /** @psalm-suppress MixedReturnTypeCoercion */
172+ return $ this ->scopes ->toArray ();
170173 }
171174
172- /** @psalm-suppress UndefinedInterfaceMethod */
173- return $ this ->scopes ->matching ($ criteria );
175+ /**
176+ * @psalm-suppress UndefinedInterfaceMethod
177+ * @psalm-suppress MixedReturnStatement
178+ * @psalm-suppress MixedMethodCall
179+ */
180+ return $ this ->scopes ->matching ($ criteria )->toArray ();
174181 }
175182
176183 public function setExpiresDatetime (\DateTimeImmutable $ expiresDatetime ): self
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ public function getIdentifier(): ?int
7676
7777 public function setIdentifier (mixed $ identifier ): self
7878 {
79+ /** @psalm-suppress MixedArgument */
7980 $ this ->setId ($ identifier );
8081
8182 return $ this ;
@@ -132,14 +133,23 @@ public function removeScope(OAuthScope $scope): self
132133 return $ this ;
133134 }
134135
135- public function getScopes (?Criteria $ criteria = null ): Collection
136+ /**
137+ * @psalm-suppress MixedInferredReturnType
138+ * @psalm-suppress MixedReturnTypeCoercion
139+ */
140+ public function getScopes (?Criteria $ criteria = null ): array
136141 {
137142 if ($ criteria === null ) {
138- return $ this ->scopes ;
143+ /** @psalm-suppress MixedReturnStatement */
144+ return $ this ->scopes ->toArray ();
139145 }
140146
141- /** @psalm-suppress UndefinedInterfaceMethod */
142- return $ this ->scopes ->matching ($ criteria );
147+ /**
148+ * @psalm-suppress UndefinedInterfaceMethod
149+ * @psalm-suppress MixedReturnStatement
150+ * @psalm-suppress MixedMethodCall
151+ */
152+ return $ this ->scopes ->matching ($ criteria )->toArray ();
143153 }
144154
145155 public function setExpiresDatetime (DateTimeImmutable $ expiresDatetime ): self
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ public function setDetails(array $details): self
9292 return $ this ;
9393 }
9494
95+ /** @psalm-suppress MixedReturnTypeCoercion */
9596 public function getDetails (): array
9697 {
9798 return $ this ->details ;
Original file line number Diff line number Diff line change @@ -84,13 +84,17 @@ public function removeAccessToken(OAuthAccessToken $accessToken): self
8484 return $ this ;
8585 }
8686
87+ /** @psalm-suppress MixedInferredReturnType */
8788 public function getAccessTokens (?Criteria $ criteria = null ): Collection
8889 {
8990 if ($ criteria === null ) {
9091 return $ this ->accessTokens ;
9192 }
9293
93- /** @psalm-suppress UndefinedInterfaceMethod */
94+ /**
95+ * @psalm-suppress UndefinedInterfaceMethod
96+ * @psalm-suppress MixedReturnStatement
97+ */
9498 return $ this ->accessTokens ->matching ($ criteria );
9599 }
96100
@@ -109,16 +113,22 @@ public function removeAuthCode(OAuthAuthCode $authCode): self
109113 {
110114 $ this ->authCodes ->removeElement ($ authCode );
111115
116+ /** @psalm-suppress MixedInferredReturnType */
112117 return $ this ;
113118 }
114119
120+ /** @psalm-suppress MixedInferredReturnType */
115121 public function getAuthCodes (?Criteria $ criteria = null ): Collection
116122 {
117123 if ($ criteria === null ) {
124+ /** @psalm-suppress MixedInferredReturnType */
118125 return $ this ->authCodes ;
119126 }
120127
121- /** @psalm-suppress UndefinedInterfaceMethod */
128+ /**
129+ * @psalm-suppress UndefinedInterfaceMethod
130+ * @psalm-suppress MixedReturnStatement
131+ */
122132 return $ this ->authCodes ->matching ($ criteria );
123133 }
124- }
134+ }
Original file line number Diff line number Diff line change @@ -116,8 +116,10 @@ public function setDetails(array $details): self
116116 return $ this ;
117117 }
118118
119+ /** @psalm-suppress MixedReturnTypeCoercion */
119120 public function getDetails (): array
120121 {
122+ /** @psalm-suppress MixedReturnTypeCoercion */
121123 return $ this ->details ;
122124 }
123- }
125+ }
You can’t perform that action at this time.
0 commit comments