<commit_before><?php
/**
 * Create DB schema.
 *
 * User: <NAME> <<EMAIL>>
 */
namespace Praxigento\Accounting\Setup;

use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
use Praxigento\Accounting\Data\Entity\Account as Account;
use Praxigento\Accounting\Data\Entity\Balance as Balance;
use Praxigento\Accounting\Data\Entity\Operation as Operation;
use Praxigento\Accounting\Data\Entity\Transaction as Transaction;
use Praxigento\Accounting\Data\Entity\Type\Asset as TypeAsset;
use Praxigento\Accounting\Data\Entity\Type\Operation as TypeOperation;
use Praxigento\Core\Lib\Setup\Db as Db;

class InstallSchema extends \Praxigento\Core\Setup\Schema\Base
{

    protected function _setup(SchemaSetupInterface $setup, ModuleContextInterface $context)
    {
        /** Read and parse JSON schema. */
        $pathToFile = __DIR__ . '/../etc/dem.json';
        $pathToNode = '/dBEAR/package/Praxigento/package/Accounting';
        $demPackage = $this->_toolDem->readDemPackage($pathToFile, $pathToNode);

        /* Type Asset */
        $entityAlias = TypeAsset::ENTITY_NAME;
        $demEntity = $demPackage->getData('package/Type/entity/Asset');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Type Operation */
        $entityAlias = TypeOperation::ENTITY_NAME;
        $demEntity = $demPackage->getData('package/Type/entity/Operation');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Account */
        $entityAlias = Account::ENTITY_NAME;
        $demEntity = $demPackage->getData('entity/Account');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Operation */
        $entityAlias = Operation::ENTITY_NAME;<commit_msg>MOBI-265 - unit tests (schema setup)<commit_after><?php
/**
 * Create DB schema.
 *
 * User: <NAME> <<EMAIL>>
 */
namespace Praxigento\Accounting\Setup;

use Praxigento\Accounting\Data\Entity\Account as Account;
use Praxigento\Accounting\Data\Entity\Balance as Balance;
use Praxigento\Accounting\Data\Entity\Operation as Operation;
use Praxigento\Accounting\Data\Entity\Transaction as Transaction;
use Praxigento\Accounting\Data\Entity\Type\Asset as TypeAsset;
use Praxigento\Accounting\Data\Entity\Type\Operation as TypeOperation;
use Praxigento\Core\Lib\Setup\Db as Db;

class InstallSchema extends \Praxigento\Core\Setup\Schema\Base
{

    protected function _setup()
    {
        /** Read and parse JSON schema. */
        $pathToFile = __DIR__ . '/../etc/dem.json';
        $pathToNode = '/dBEAR/package/Praxigento/package/Accounting';
        $demPackage = $this->_toolDem->readDemPackage($pathToFile, $pathToNode);

        /* Type Asset */
        $entityAlias = TypeAsset::ENTITY_NAME;
        $demEntity = $demPackage->getData('package/Type/entity/Asset');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Type Operation */
        $entityAlias = TypeOperation::ENTITY_NAME;
        $demEntity = $demPackage->getData('package/Type/entity/Operation');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Account */
        $entityAlias = Account::ENTITY_NAME;
        $demEntity = $demPackage->getData('entity/Account');
        $this->_toolDem->createEntity($entityAlias, $demEntity);

        /* Operation */
        $entityAlias = Operation::ENTITY_NAME;
{'fraction_non_alphanumeric': 0.13287955016277006, 'fraction_numerical': 0.0008878366380585972, 'mean_word_length': 3.636488340192044, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 31, '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': '4982525', 'n_tokens_mistral': 1013, 'n_tokens_neox': 998, 'n_words': 176}