Skip to content
#

clean-code

Here are 1,339 public repositories matching this topic...

04cfb1ed
04cfb1ed commented Oct 30, 2020
  • PHPMD version: 2.9.1
  • PHP Version: 7.4.10
  • Installation type: composer
  • Operating System / Distribution & Version: Windows 10 / Linux

Current Behavior

I'm trying to use exclude-pattern in a ruleset, but the same path doesn't work in windows/linux at the same time.

Usually I use a path like
<exclude-pattern>application/folder</exclude-pattern>

But, this only works for linux

GuardClauses
ardalis
ardalis commented Jul 23, 2020

An Expression-based Guard could be used to provide flexibility and could cover any case not already taken care of by the library, without the need to write your own guard clause method.

public static T AgainstExpression<T>([JetBrainsNotNull] this IGuardClause<T> guardClause, [JetBrainsNotNull] Func<T, bool> func, [JetBrainsNotNull] string message) where T : struct
{
    if (func(gu

Improve this page

Add a description, image, and links to the clean-code topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the clean-code topic, visit your repo's landing page and select "manage topics."

Learn more