<commit_before><?php

/*
 * This file is part of the Sonata project.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\BasketBundle\Form;

use Symfony\Component\Form\AbstractType;
use Sonata\Component\Basket\BasketInterface;
use Sonata\Component\Customer\AddressManagerInterface;
use Sonata\Component\Customer\AddressInterface;
use Sonata\Component\Delivery\Pool as DeliveryPool;
use Sonata\Component\Form\Transformer\DeliveryMethodTransformer;
use Sonata\Component\Delivery\DeliverySelectorInterface;
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
use Sonata\AdminBundle\Model\ModelManagerInterface;
use Symfony\Component\Form\FormBuilderInterface;

class ShippingType extends AbstractType
{
    /**
     * @var AddressManagerInterface
     */
    protected $addressManager;

    /**
     * @var DeliveryPool
     */
    protected $deliveryPool;

    /**
     * @var DeliverySelectorInterface
     */
    protected $deliverySelector;

    /**
     * @var ModelManagerInterface
     */
    protected $modelManager;

    /**
     * Constructor
     *
     * @param AddressManagerInterface   $addressManager
     * @param ModelManagerInterface     $modelManager
     * @param DeliveryPool              $deliveryPool
     * @param DeliverySelectorInterface $deliverySelector
     */
    public function __construct(AddressManagerInterface $addressManager, ModelManagerInterface $modelManager, DeliveryPool $deliveryPool, DeliverySelectorInterface $deliverySelector)
    {
        $this->addressManager   = $addressManager;
        $this->modelManager     = $modelManager;
        $this->deliverySelector = $deliverySelector;
        $this->deliveryPool     = $deliveryPool;
    }

    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $basket = $builder->getData();<commit_msg>Fix shipping type<commit_after><?php

/*
 * This file is part of the Sonata project.
 *
 * (c) <NAME> <<EMAIL>>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Sonata\BasketBundle\Form;

use Sonata\Component\Delivery\ServiceDeliverySelectorInterface;
use Symfony\Component\Form\AbstractType;
use Sonata\Component\Basket\BasketInterface;
use Sonata\Component\Customer\AddressManagerInterface;
use Sonata\Component\Customer\AddressInterface;
use Sonata\Component\Delivery\Pool as DeliveryPool;
use Sonata\Component\Form\Transformer\DeliveryMethodTransformer;
use Symfony\Component\Form\Extension\Core\ChoiceList\SimpleChoiceList;
use Sonata\AdminBundle\Model\ModelManagerInterface;
use Symfony\Component\Form\FormBuilderInterface;

class ShippingType extends AbstractType
{
    /**
     * @var AddressManagerInterface
     */
    protected $addressManager;

    /**
     * @var DeliveryPool
     */
    protected $deliveryPool;

    /**
     * @var ServiceDeliverySelectorInterface
     */
    protected $deliverySelector;

    /**
     * @var ModelManagerInterface
     */
    protected $modelManager;

    /**
     * Constructor
     *
     * @param AddressManagerInterface          $addressManager
     * @param ModelManagerInterface            $modelManager
     * @param DeliveryPool                     $deliveryPool
     * @param ServiceDeliverySelectorInterface $deliverySelector
     */
    public function __construct(AddressManagerInterface $addressManager, ModelManagerInterface $modelManager, DeliveryPool $deliveryPool, ServiceDeliverySelectorInterface $deliverySelector)
    {
        $this->addressManager   = $addressManager;
        $this->modelManager     = $modelManager;
        $this->deliverySelector = $deliverySelector;
        $this->deliveryPool     = $deliveryPool;
    }

    /**
     * {@inheritdoc}
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $basket = $builder->getData();
{'fraction_non_alphanumeric': 0.09223181257706535, 'fraction_numerical': 0.0, 'mean_word_length': 3.4768211920529803, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 19, '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': '3098024', 'n_tokens_mistral': 1082, 'n_tokens_neox': 1061, 'n_words': 231}