Skip to content
This repository has been archived by the owner on Jun 23, 2021. It is now read-only.

Commit

Permalink
III-1804: Coding standards in copied InMemoryRepository.
Browse files Browse the repository at this point in the history
  • Loading branch information
bertramakers committed Jan 20, 2017
1 parent 55f2cf3 commit 7a79ad3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/Broadway/Saga/State/InMemoryRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ public function findBy(Criteria $criteria, $sagaId)
}

foreach ($criteria->getComparisons() as $key => $value) {
$states = array_filter($states, function ($elem) use ($key, $value) {
$stateValue = $elem->get($key);

return is_array($stateValue) ? in_array($value, $stateValue) : $value === $stateValue;
});
$states = array_filter(
$states,
function ($elem) use ($key, $value) {
$stateValue = $elem->get($key);
return is_array($stateValue) ? in_array($value, $stateValue) : $value === $stateValue;
}
);
}

foreach ($states as $state) {
Expand Down

0 comments on commit 7a79ad3

Please sign in to comment.