Passed
Pull Request — master (#377)
by
unknown
04:35
created
src/Aimeos/Shop/Base/Context.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -264,15 +264,15 @@
 block discarded – undo
264 264
 	 * @param \Aimeos\MShop\Context\Item\Iface $context Context object
265 265
 	 * @return \Aimeos\MShop\Context\Item\Iface Modified context object
266 266
 	 */
267
-	protected function addGroups(\Aimeos\MShop\Context\Item\Iface $context): \Aimeos\MShop\Context\Item\Iface
267
+	protected function addGroups( \Aimeos\MShop\Context\Item\Iface $context ): \Aimeos\MShop\Context\Item\Iface
268 268
 	{
269
-		$key = collect(config('shop.routes'))->where('prefix', ltrim(optional(Route::getCurrentRoute())->getPrefix(), '/'))->keys()->first();
270
-		$guard = data_get(config('shop.guards'), $key, Auth::getDefaultDriver());
269
+		$key = collect( config( 'shop.routes' ) )->where( 'prefix', ltrim( optional( Route::getCurrentRoute() )->getPrefix(), '/' ) )->keys()->first();
270
+		$guard = data_get( config( 'shop.guards' ), $key, Auth::getDefaultDriver() );
271 271
 
272
-		if (($userid = Auth::guard($guard)->id()) !== null) {
273
-			$context->setGroupIds(function () use ($context, $userid) {
274
-				$manager = \Aimeos\MShop::create($context, 'customer');
275
-				return $manager->getItem($userid, array('customer/group'))->getGroups();
272
+		if( ( $userid = Auth::guard( $guard )->id() ) !== null ) {
273
+			$context->setGroupIds( function() use ( $context, $userid ) {
274
+				$manager = \Aimeos\MShop::create( $context, 'customer' );
275
+				return $manager->getItem( $userid, array( 'customer/group' ) )->getGroups();
276 276
 			});
277 277
 		}
278 278
 
Please login to merge, or discard this patch.