<commit_before><?php
class Kwc_Shop_Cart_Checkout_Payment_PayPal_Cancel_ContentSender extends Kwf_Component_Abstract_ContentSender_Default
{
    public function sendContent($includeMaster)
    {
        $session = new Kwf_Session_Namespace('kwcShopCart');
        if ($session->paypalCartId) {
            Kwc_Shop_Cart_Orders::setCartOrderId($session->paypalCartId);
            $order = Kwf_Model_Abstract::getInstance(Kwc_Abstract::getSetting($this->_data->parent->parent->parent->componentClass, 'childModel'))
                ->getReferencedModel('Order')->getCartOrder();
            if ($order && $order->status == 'pending') {
                $order->status = 'cart';
                $order->save();
            }
            unset($session->paypalCartId);
        }
        Kwf_Util_Redirect::redirect($this->_data->parent->parent->parent->getUrl());<commit_msg>on cancel set order status always to cart in paypal payment<commit_after><?php
class Kwc_Shop_Cart_Checkout_Payment_PayPal_Cancel_ContentSender extends Kwf_Component_Abstract_ContentSender_Default
{
    public function sendContent($includeMaster)
    {
        $session = new Kwf_Session_Namespace('kwcShopCart');
        if ($session->paypalCartId) {
            Kwc_Shop_Cart_Orders::setCartOrderId($session->paypalCartId);
            $order = Kwf_Model_Abstract::getInstance(Kwc_Abstract::getSetting($this->_data->parent->parent->parent->componentClass, 'childModel'))
                ->getReferencedModel('Order')->getCartOrder();
            if ($order) {
                $order->status = 'cart';
                $order->save();
            }
            unset($session->paypalCartId);
        }
        Kwf_Util_Redirect::redirect($this->_data->parent->parent->parent->getUrl());
{'fraction_non_alphanumeric': 0.12919749573136027, 'fraction_numerical': 0.0, 'mean_word_length': 3.266990291262136, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7058255', 'n_tokens_mistral': 494, 'n_tokens_neox': 481, 'n_words': 61}