Skip to content

Commit

Permalink
Use expression bodies (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Oct 26, 2023
1 parent c3c5d96 commit 61c109c
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Cake.Issues.PullRequests/BasePullRequestSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,11 @@ public void AddCapability(IPullRequestSystemCapability capability)

/// <inheritdoc/>
public bool HasCapability<T>()
where T : IPullRequestSystemCapability
{
return this.capabilities.Any(x => x is T);
}
where T : IPullRequestSystemCapability => this.capabilities.Exists(x => x is T);

/// <inheritdoc/>
public T GetCapability<T>()
where T : IPullRequestSystemCapability
{
return this.capabilities.OfType<T>().FirstOrDefault();
}
where T : IPullRequestSystemCapability => this.capabilities.OfType<T>().FirstOrDefault();

/// <inheritdoc/>
public void PostDiscussionThreads(IEnumerable<IIssue> issues, string commentSource)
Expand Down

0 comments on commit 61c109c

Please sign in to comment.