Passed
Push — master ( 829d07...bbd00f )
by Aimeos
17:54
created
src/Base/Context.php 1 patch
Braces   +7 added lines, -4 removed lines patch added patch discarded remove patch
@@ -283,9 +283,13 @@  discard block
 block discarded – undo
283 283
 		if( ( $guard = Auth::guard( $gname ) ) && ( $userid = $guard->id() ) )
284 284
 		{
285 285
 			$context->setUser( function() use ( $context, $userid ) {
286
-				try {
286
+				try
287
+				{
287 288
 					return \Aimeos\MShop::create( $context, 'customer' )->get( $userid, ['group'] );
288
-				} catch( \Aimeos\MShop\Exception $e ) { // avoid errors if user is assigned to another site
289
+				}
290
+				catch( \Aimeos\MShop\Exception $e )
291
+				{
292
+// avoid errors if user is assigned to another site
289 293
 					return null;
290 294
 				}
291 295
 			} );
@@ -295,8 +299,7 @@  discard block
 block discarded – undo
295 299
 			} );
296 300
 
297 301
 			$context->setEditor( $guard->user()?->email ?: \Request::ip() );
298
-		}
299
-		elseif( $ip = \Request::ip() )
302
+		} elseif( $ip = \Request::ip() )
300 303
 		{
301 304
 			$context->setEditor( $ip );
302 305
 		}
Please login to merge, or discard this patch.