public function cart(array $condition, array $data)
    {
        $is_cart = (int) isset($data['cart_id']);
        $value = (int) filter_var(reset($condition['value']), FILTER_VALIDATE_BOOLEAN);
        return $this->compare($is_cart, $value, $condition['operator']);
    }
public function cart(array $condition, array $data)
    {
        $is_cart = (int) isset($data['cart_id']);
        $value = (int) filter_var(reset($condition['value']), FILTER_VALIDATE_BOOLEAN);
        return $this->compare($is_cart, $value, $condition['operator']);
    }
public function cart ( array $ condition , array $ data ) { $ is_cart = ( int ) isset ( $ data [ 'cart_id' ] ) ; $ value = ( int ) filter_var ( reset ( $ condition [ 'value' ] ) , FILTER_VALIDATE_BOOLEAN ) ; return $ this -> compare ( $ is_cart , $ value , $ condition [ 'operator' ] ) ; }
Whether the cart scope condition is met
@param array $condition
@param array $data
@return boolean
Whether the cart scope condition is met