Skip to content

Commit

Permalink
remove redundant else
Browse files Browse the repository at this point in the history
  • Loading branch information
agray committed Sep 6, 2024
1 parent ada3e83 commit 9cac542
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
10 changes: 4 additions & 6 deletions Saucery.Core/Dojo/DojoExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,11 @@ public static BrowserVersion Classify(this BrowserVersion browserVersion)
browserVersion.PlatformType = PlatformType.Android;
return browserVersion;
}
else

if (browserVersion.IsAnAppleDevice())
{
if (browserVersion.IsAnAppleDevice())
{
browserVersion.PlatformType = PlatformType.Apple;
return browserVersion;
}
browserVersion.PlatformType = PlatformType.Apple;
return browserVersion;
}

//Desktop
Expand Down
16 changes: 8 additions & 8 deletions Saucery.Core/Dojo/PlatformConfigurator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,15 @@ public List<BrowserVersion> FilterAll(List<SaucePlatform> platforms)
return ValidateReal(platform) != null
? new BrowserVersion(platform)
: null;
} else {
var bv = Validate(platform);
if(bv != null) {
bv.ScreenResolution = platform.ScreenResolution;
bv.DeviceOrientation = platform.DeviceOrientation;
}

return bv;
}

var bv = Validate(platform);
if(bv != null) {
bv.ScreenResolution = platform.ScreenResolution;
bv.DeviceOrientation = platform.DeviceOrientation;
}

return bv;
}

public BrowserVersion? Validate(SaucePlatform requested)
Expand Down
10 changes: 4 additions & 6 deletions Saucery.Core/OnDemand/PlatformClassifer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ public static SaucePlatform Classify(this SaucePlatform platform)
platform.PlatformType = PlatformType.Android;
return platform;
}
else

if (platform.IsAnAppleDevice())
{
if (platform.IsAnAppleDevice())
{
platform.PlatformType = PlatformType.Apple;
return platform;
}
platform.PlatformType = PlatformType.Apple;
return platform;
}

//Desktop
Expand Down

0 comments on commit 9cac542

Please sign in to comment.