Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public static function match(Rule $rule, $row)
}

/**
* Create a rule that matches if **all** of the given rules do
* Create a rule that matches if **all** of the given rules do.
* If $rules is empty, the resulting Rule will always match.
*
*
* @param Rule ...$rules
*
Expand All @@ -65,7 +67,8 @@ public static function all(Rule ...$rules)
}

/**
* Return whether the given rules all match the given item
* Return true if all rules match the given item
* Returns true if $rules is empty
*
* @param All $rules
* @param object $row
Expand All @@ -84,7 +87,8 @@ protected function matchAll(All $rules, $row)
}

/**
* Create a rule that matches if **any** of the given rules do
* Create a rule that matches if **any** of the given rules do.
* If $rules is empty, the resulting Rule will never match.
*
* @param Rule ...$rules
*
Expand All @@ -96,7 +100,8 @@ public static function any(Rule ...$rules)
}

/**
* Return whether any of the given rules match the given item
* Return whether any rule matches the given item
* Returns false if $rules is empty
*
* @param Any $rules
* @param object $row
Expand All @@ -116,6 +121,7 @@ protected function matchAny(Any $rules, $row)

/**
* Create a rule that matches if **none** of the given rules do
* If $rules is empty, the resulting Rule will always match.
*
* @param Rule ...$rules
*
Expand All @@ -127,7 +133,8 @@ public static function none(Rule ...$rules)
}

/**
* Return whether none of the given rules match the given item
* Return whether no rules match the given item
* Returns true if $rules is empty
*
* @param None $rules
* @param object $row
Expand Down