<commit_before><?php
/**
 * User: <NAME> <<EMAIL>>
 */

namespace Praxigento\Downline\Observer;


use Magento\Framework\Event\Observer as Observer;

class SalesModelServiceQuoteSubmitSuccess
    implements \Magento\Framework\Event\ObserverInterface
{
    /** @var \Magento\Sales\Api\OrderCustomerManagementInterface */
    private $manOrderCust;

    public function __construct(
        \Magento\Sales\Api\OrderCustomerManagementInterface $manOrderCust
    ) {
        $this->manOrderCust = $manOrderCust;
    }

    public function execute(Observer $observer) {
        /** @var \Magento\Sales\Model\Order $order */
        $order = $observer->getData('order');
        /** @var \Magento\Quote\Model\Quote $quote */
        $quote = $observer->getData('quote');

        $orderId = $order->getId();
        // $this->manOrderCust->create($orderId);
    }
}<commit_msg>MOBI-1030 Auto registration for new customers<commit_after><?php
/**
 * User: <NAME> <<EMAIL>>
 */

namespace Praxigento\Downline\Observer;


use Magento\Framework\Event\Observer as Observer;

class SalesModelServiceQuoteSubmitSuccess
    implements \Magento\Framework\Event\ObserverInterface
{
    /** @var \Magento\Sales\Api\OrderCustomerManagementInterface */
    private $manOrderCust;

    public function __construct(
        \Magento\Sales\Api\OrderCustomerManagementInterface $manOrderCust
    ) {
        $this->manOrderCust = $manOrderCust;
    }

    public function execute(Observer $observer) {
        /** @var \Magento\Sales\Model\Order $order */
        $order = $observer->getData('order');
        /** @var \Magento\Quote\Model\Quote $quote */
        $quote = $observer->getData('quote');
        $isGuest = $quote->getCustomerIsGuest();
        if ($isGuest) {
            $orderId = $order->getId();
            $this->manOrderCust->create($orderId);
        }
    }
}
{'fraction_non_alphanumeric': 0.13986013986013987, 'fraction_numerical': 0.002151694459386767, 'mean_word_length': 3.052287581699346, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 22, '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': '6609129', 'n_tokens_mistral': 570, 'n_tokens_neox': 556, 'n_words': 93}