Skip to content

Commit

Permalink
2nd attempt at fix for VersionMatcher warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Dec 10, 2018
1 parent 0e1e5bd commit 3f13f9d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Core/Matcher/ContentVersionMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ public function match(array $contentConditions, array $versionConditions = array
/**
* Like match, but will throw an exception if there are 0 or more than 1 items matching
*
* @param array $conditions
* @param array $contentConditions
* @param array $versionConditions
* @param array $sort
* @param int $offset
* @return mixed
* @throws \Exception
*/
Expand Down Expand Up @@ -107,7 +110,7 @@ public function matchContentVersions(array $versionConditions, Content $content)
}
}

protected function matchAnd(array $conditionsArray, $content = null)
protected function matchAnd($conditionsArray, $content = null)
{
/// @todo introduce proper re-validation of all child conditions
if (!is_array($conditionsArray) || !count($conditionsArray)) {
Expand All @@ -130,7 +133,7 @@ protected function matchAnd(array $conditionsArray, $content = null)
return $results;
}

protected function matchOr(array $conditionsArray, $content = null)
protected function matchOr($conditionsArray, $content = null)
{
/// @todo introduce proper re-validation of all child conditions
if (!is_array($conditionsArray) || !count($conditionsArray)) {
Expand Down
2 changes: 1 addition & 1 deletion WHATSNEW.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 5.7.1
Version 5.7.2
=============

* Fix: warnings due to ContentVersionMatcher methods signatures
Expand Down

1 comment on commit 3f13f9d

@Alaarafeh
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please Correct here matchOr($conditionsArray, $content = null)
but in AbstractMatcher.php the function matchOr(array $conditionsArray)
when i try to install come the error :

Declaration of Kaliop\eZMigrationBundle\Core\Matcher\ContentVersionMatcher::matchOr($conditionsArray, $content = NULL) should be compatible with Kaliop\eZMigrationBundle\Core\Matcher\AbstractMatcher::matchOr(array $conditionsArray)

Please sign in to comment.