File tree Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Expand file tree Collapse file tree 1 file changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -249,25 +249,23 @@ protected function getRedirectionUrl(UserInterface $user)
249
249
*/
250
250
protected function getClient ()
251
251
{
252
- if (null === $ this ->client ) {
253
- $ request = $ this ->getCurrentRequest ();
252
+ if (null !== $ this ->client ) {
253
+ return $ this ->client ;
254
+ }
254
255
255
- $ client = null ;
256
- if (null !== $ request ) {
257
- if (null === $ clientId = $ request ->get ('client_id ' )) {
258
- $ form = $ this ->authorizeForm ;
259
- $ formData = $ request ->get ($ form ->getName (), array ());
260
- $ clientId = isset ($ formData ['client_id ' ]) ? $ formData ['client_id ' ] : null ;
261
- }
256
+ if (null === $ request = $ this ->getCurrentRequest ()) {
257
+ throw new NotFoundHttpException ('Client not found. ' );
258
+ }
262
259
263
- $ client = $ this ->clientManager ->findClientByPublicId ($ clientId );
264
- }
260
+ if (null === $ clientId = $ request ->get ('client_id ' )) {
261
+ $ formData = $ request ->get ($ this ->authorizeForm ->getName (), []);
262
+ $ clientId = $ formData ['client_id ' ] ?? null ;
263
+ }
265
264
266
- if (null === $ client ) {
267
- throw new NotFoundHttpException ('Client not found. ' );
268
- }
265
+ $ this ->client = $ this ->clientManager ->findClientByPublicId ($ clientId );
269
266
270
- $ this ->client = $ client ;
267
+ if (null === $ this ->client ) {
268
+ throw new NotFoundHttpException ('Client not found. ' );
271
269
}
272
270
273
271
return $ this ->client ;
You can’t perform that action at this time.
0 commit comments