src/RunOpenCode/ExchangeRate/Utils/FilterUtilHelper.php
private static function matchesArrayCriteria($key, $object, array $criteria)
    {
        $criteria = self::extractArrayCriteria($key, $criteria);

        if (count($criteria) === 0) {
            return true;
        }

        $getter = sprintf('get%s', ucfirst($key));

        if (!method_exists($object, $getter)) {
            throw new RuntimeException(sprintf('Object instance of "%s" does not have required getter "%s" to be used for filtering.', get_class($object), $getter));
        }

        return in_array($object->{$getter}(), $criteria, true);
    }
private static function matchesArrayCriteria($key, $object, array $criteria)
    {
        $criteria = self::extractArrayCriteria($key, $criteria);

        if (count($criteria) === 0) {
            return true;
        }

        $getter = sprintf('get%s', ucfirst($key));

        if (!method_exists($object, $getter)) {
            throw new RuntimeException(sprintf('Object instance of "%s" does not have required getter "%s" to be used for filtering.', get_class($object), $getter));
        }

        return in_array($object->{$getter}(), $criteria, true);
    }
Check if array|string criteria is matched.

@param string $key Array|string criteria key.
@param object $object Object to check for match.
@param array $criteria Filter criterias.
@return bool TRUE if there is a match.