<commit_before><?php
namespace Rolice\Econt;

use App;

use Rolice\Econt\Components\Loading;
use Rolice\Econt\Components\Sender;
use Rolice\Econt\Components\Receiver;
use Rolice\Econt\Components\Shipment;
use Rolice\Econt\Components\Payment;
use Rolice\Econt\Components\Services;

/**
 * Class Waybill
 * Interface exported by this package to allow creating/issuing new Econt waybills for printing.
 * @package Rolice\Econt
 * @version 0.1
 * @access public
 */
class Waybill
{
    public static function issue(Sender $sender, Receiver $receiver, Shipment $shipment, Payment $payment, Services $services)
    {
        $data = [
            'system' => [
                'validate' => 0,
                'response_type' => 'JSON',
                'only_calculate' => 1,
            ],

            'loadings' => [
                new Loading($sender, $receiver, $shipment, $payment, $services),
            ],
        ];

        $econt = App::make('Econt');
        $waybill = $econt->request(RequestType::SHIPPING, $data, Endpoint::PARCEL);

        return $waybill;
    }
}<commit_msg>Optimized code.<commit_after><?php
namespace Rolice\Econt;

use App;

use Rolice\Econt\Components\Loading;
use Rolice\Econt\Components\Sender;
use Rolice\Econt\Components\Receiver;
use Rolice\Econt\Components\Shipment;
use Rolice\Econt\Components\Payment;
use Rolice\Econt\Components\Services;

/**
 * Class Waybill
 * Interface exported by this package to allow creating/issuing new Econt waybills for printing.
 * @package Rolice\Econt
 * @version 0.1
 * @access public
 */
class Waybill
{
    public static function issue(Sender $sender, Receiver $receiver, Shipment $shipment, Payment $payment, Services $services)
    {
        $data = [
            'system' => [
                'validate' => 0,
                'response_type' => 'XML',
                'only_calculate' => 1,
            ],

            'loadings' => [
                new Loading($sender, $receiver, $shipment, $payment, $services),
            ],
        ];

        $econt = App::make('Econt');
        $waybill = $econt->request(RequestType::SHIPPING, $data, Endpoint::PARCEL);

        return $waybill;
    }
}
{'fraction_non_alphanumeric': 0.12723932016536518, 'fraction_numerical': 0.0036747818098300414, 'mean_word_length': 2.588138385502471, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, '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': '1017172', 'n_tokens_mistral': 688, 'n_tokens_neox': 656, 'n_words': 153}