<commit_before><?php
/**
 * User: <NAME> <<EMAIL>>
 */
namespace Praxigento\Bonus\Base\Lib\Repo\Def;

use Flancer32\Lib\DataObject;
use Praxigento\Accounting\Data\Entity\Account;
use Praxigento\Accounting\Data\Entity\Transaction;
use Praxigento\Accounting\Data\Entity\Type\Asset as TypeAsset;
use Praxigento\BonusBase\Config as Cfg;
use Praxigento\Bonus\Base\Lib\Entity\Calculation;
use Praxigento\Bonus\Base\Lib\Entity\Cfg\Generation as CfgGeneration;
use Praxigento\Bonus\Base\Lib\Entity\Compress;
use Praxigento\Bonus\Base\Lib\Entity\Log\Rank as LogRank;
use Praxigento\Bonus\Base\Lib\Entity\Log\Sales as LogSales;
use Praxigento\Bonus\Base\Lib\Entity\Period;
use Praxigento\Bonus\Base\Lib\Entity\Rank;
use Praxigento\Bonus\Base\Lib\Entity\Type\Calc as TypeCalc;
use Praxigento\Bonus\Base\Lib\Repo\IModule;
use Praxigento\Core\Data\Entity\Type\Base as TypeBase;
use Praxigento\Core\Repo\Def\Base;
use Praxigento\Downline\Lib\Entity\Snap;

class Module extends Base implements IModule {
    /** @var \Praxigento\Core\Lib\Tool\Date */
    protected $_toolDate;

    public function __construct(
        \Praxigento\Core\Lib\Repo\IBasic $repoBasic,
        \Praxigento\Core\Lib\Tool\Date $toolDate
    ) {
        parent::__construct($repoBasic);
        $this->_toolDate = $toolDate;
    }

    public function addLogSaleOrder($transId, $saleOrderId) {
        $bind = [
            LogSales::ATTR_TRANS_ID       => $transId,
            LogSales::ATTR_SALES_ORDER_ID => $saleOrderId
        ];
        $this->_resourceConnection->addEntity(LogSales::ENTITY_NAME, $bind);
    }

    public function addPeriod($calcTypeId, $dsBegin, $dsEnd) {
        $result = new DataObject();
        $this->_getConn()->beginTransaction();
        try {<commit_msg>MOBI-265 - Accounting (integration tests)<commit_after><?php
/**
 * User: <NAME> <<EMAIL>>
 */
namespace Praxigento\Bonus\Base\Lib\Repo\Def;

use Flancer32\Lib\DataObject;
use Praxigento\Accounting\Data\Entity\Account;
use Praxigento\Accounting\Data\Entity\Transaction;
use Praxigento\Accounting\Data\Entity\Type\Asset as TypeAsset;
use Praxigento\BonusBase\Config as Cfg;
use Praxigento\Bonus\Base\Lib\Entity\Calculation;
use Praxigento\Bonus\Base\Lib\Entity\Cfg\Generation as CfgGeneration;
use Praxigento\Bonus\Base\Lib\Entity\Compress;
use Praxigento\Bonus\Base\Lib\Entity\Log\Rank as LogRank;
use Praxigento\Bonus\Base\Lib\Entity\Log\Sales as LogSales;
use Praxigento\Bonus\Base\Lib\Entity\Period;
use Praxigento\Bonus\Base\Lib\Entity\Rank;
use Praxigento\Bonus\Base\Lib\Entity\Type\Calc as TypeCalc;
use Praxigento\Bonus\Base\Lib\Repo\IModule;
use Praxigento\Core\Data\Entity\Type\Base as TypeBase;
use Praxigento\Core\Repo\Def\Base;
use Praxigento\Downline\Lib\Entity\Snap;

class Module extends Base implements IModule {
    /** @var \Praxigento\Core\Lib\Tool\Date */
    protected $_toolDate;

    public function __construct(
        \Praxigento\Core\Repo\IBasic $repoBasic,
        \Praxigento\Core\Lib\Tool\Date $toolDate
    ) {
        parent::__construct($repoBasic);
        $this->_toolDate = $toolDate;
    }

    public function addLogSaleOrder($transId, $saleOrderId) {
        $bind = [
            LogSales::ATTR_TRANS_ID       => $transId,
            LogSales::ATTR_SALES_ORDER_ID => $saleOrderId
        ];
        $this->_resourceConnection->addEntity(LogSales::ENTITY_NAME, $bind);
    }

    public function addPeriod($calcTypeId, $dsBegin, $dsEnd) {
        $result = new DataObject();
        $this->_getConn()->beginTransaction();
        try {
{'fraction_non_alphanumeric': 0.1267725467952354, 'fraction_numerical': 0.0019852524106636414, 'mean_word_length': 3.71524064171123, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 23, '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': '1654876', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1231, 'n_words': 193}