mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-01-11 21:38:40 +00:00
autofixes
This commit is contained in:
parent
93c4ab93f2
commit
522adefd88
|
|
@ -50,7 +50,7 @@ final class Installer extends InstallerAbstract
|
|||
self::importAccounts($app);
|
||||
}
|
||||
|
||||
private static function importAccounts(ApplicationAbstract $app)
|
||||
private static function importAccounts(ApplicationAbstract $app) : void
|
||||
{
|
||||
/** @var \Modules\Accounting\Controller\ApiController $module */
|
||||
$module = $app->moduleManager->getModuleInstance('Accounting', 'Api');
|
||||
|
|
|
|||
|
|
@ -14,15 +14,15 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Accounting\Controller;
|
||||
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Model\Message\FormValidation;
|
||||
use Modules\Accounting\Models\AccountAbstract;
|
||||
use Modules\Accounting\Models\AccountAbstractMapper;
|
||||
use Modules\Accounting\Models\AccountL11nMapper;
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
use phpOMS\Localization\ISO639x1Enum;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
use phpOMS\Message\RequestAbstract;
|
||||
use phpOMS\Message\ResponseAbstract;
|
||||
use phpOMS\Model\Message\FormValidation;
|
||||
|
||||
/**
|
||||
* Accounting controller class.
|
||||
|
|
@ -95,7 +95,7 @@ final class ApiController extends Controller
|
|||
*/
|
||||
private function createAccountFromRequest(RequestAbstract $request) : AccountAbstract
|
||||
{
|
||||
$account = new AccountAbstract();
|
||||
$account = new AccountAbstract();
|
||||
$account->account = $request->getDataString('account') ?? '';
|
||||
$account->setL11n($request->getDataString('content') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
|
||||
|
||||
|
|
|
|||
|
|
@ -36,10 +36,10 @@ class AccountAbstractMapper extends DataMapperFactory
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const COLUMNS = [
|
||||
'accounting_account_id' => ['name' => 'accounting_account_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'accounting_account_id' => ['name' => 'accounting_account_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'accounting_account_account' => ['name' => 'accounting_account_account', 'type' => 'string', 'internal' => 'account', 'autocomplete' => true],
|
||||
'accounting_account_type' => ['name' => 'accounting_account_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'accounting_account_parent' => ['name' => 'accounting_account_parent', 'type' => 'string', 'internal' => 'parent'],
|
||||
'accounting_account_type' => ['name' => 'accounting_account_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'accounting_account_parent' => ['name' => 'accounting_account_parent', 'type' => 'string', 'internal' => 'parent'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ final class AccountL11nMapper extends DataMapperFactory
|
|||
* @since 1.0.0
|
||||
*/
|
||||
public const COLUMNS = [
|
||||
'accounting_account_l11n_id' => ['name' => 'accounting_account_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'accounting_account_l11n_title' => ['name' => 'accounting_account_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
|
||||
'accounting_account_l11n_id' => ['name' => 'accounting_account_l11n_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'accounting_account_l11n_title' => ['name' => 'accounting_account_l11n_title', 'type' => 'string', 'internal' => 'content', 'autocomplete' => true],
|
||||
'accounting_account_l11n_account' => ['name' => 'accounting_account_l11n_account', 'type' => 'int', 'internal' => 'ref'],
|
||||
'accounting_account_l11n_lang' => ['name' => 'accounting_account_l11n_lang', 'type' => 'string', 'internal' => 'language'],
|
||||
'accounting_account_l11n_lang' => ['name' => 'accounting_account_l11n_lang', 'type' => 'string', 'internal' => 'language'],
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user