rule = $rule; } /** * @param Cart $cart * * @return bool */ public function check($cart) { $limits = $this->rule->getLimits(); if (count($limits) === 0) { return true; } foreach ($limits as $limit) { if ( ! $limit->check($this->rule, $cart)) { return false; } } return true; } }