mirror of
https://github.com/Karaka-Management/oms-SupplierManagement.git
synced 2026-01-11 17:28:41 +00:00
Automated formatting changes
This commit is contained in:
parent
3ee10d69fe
commit
a3c16aaed1
|
|
@ -25,12 +25,12 @@ use Modules\SupplierManagement\Models\Supplier;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttribute;
|
use Modules\SupplierManagement\Models\SupplierAttribute;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeMapper;
|
use Modules\SupplierManagement\Models\SupplierAttributeMapper;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeType;
|
use Modules\SupplierManagement\Models\SupplierAttributeType;
|
||||||
use phpOMS\Localization\BaseStringL11n;
|
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeTypeL11nMapper;
|
use Modules\SupplierManagement\Models\SupplierAttributeTypeL11nMapper;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeTypeMapper;
|
use Modules\SupplierManagement\Models\SupplierAttributeTypeMapper;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeValue;
|
use Modules\SupplierManagement\Models\SupplierAttributeValue;
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeValueMapper;
|
use Modules\SupplierManagement\Models\SupplierAttributeValueMapper;
|
||||||
use Modules\SupplierManagement\Models\SupplierMapper;
|
use Modules\SupplierManagement\Models\SupplierMapper;
|
||||||
|
use phpOMS\Localization\BaseStringL11n;
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
use phpOMS\Localization\ISO639x1Enum;
|
||||||
use phpOMS\Message\Http\RequestStatusCode;
|
use phpOMS\Message\Http\RequestStatusCode;
|
||||||
use phpOMS\Message\NotificationLevel;
|
use phpOMS\Message\NotificationLevel;
|
||||||
|
|
@ -273,7 +273,7 @@ final class ApiController extends Controller
|
||||||
private function createSupplierAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
private function createSupplierAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
||||||
{
|
{
|
||||||
$attrL11n = new BaseStringL11n();
|
$attrL11n = new BaseStringL11n();
|
||||||
$attrL11n->ref = (int) ($request->getData('type') ?? 0);
|
$attrL11n->ref = (int) ($request->getData('type') ?? 0);
|
||||||
$attrL11n->setLanguage((string) (
|
$attrL11n->setLanguage((string) (
|
||||||
$request->getData('language') ?? $request->getLanguage()
|
$request->getData('language') ?? $request->getLanguage()
|
||||||
));
|
));
|
||||||
|
|
@ -426,7 +426,7 @@ final class ApiController extends Controller
|
||||||
->where('id', (int) ($request->getData('type') ?? 0))
|
->where('id', (int) ($request->getData('type') ?? 0))
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
$attrValue = new SupplierAttributeValue();
|
$attrValue = new SupplierAttributeValue();
|
||||||
$attrValue->isDefault = (bool) ($request->getData('default') ?? false);
|
$attrValue->isDefault = (bool) ($request->getData('default') ?? false);
|
||||||
$attrValue->setValue($request->getData('value'), $type->datatype);
|
$attrValue->setValue($request->getData('value'), $type->datatype);
|
||||||
|
|
||||||
|
|
@ -497,7 +497,7 @@ final class ApiController extends Controller
|
||||||
private function createSupplierAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
private function createSupplierAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
||||||
{
|
{
|
||||||
$attrL11n = new BaseStringL11n();
|
$attrL11n = new BaseStringL11n();
|
||||||
$attrL11n->ref = (int) ($request->getData('value') ?? 0);
|
$attrL11n->ref = (int) ($request->getData('value') ?? 0);
|
||||||
$attrL11n->setLanguage((string) (
|
$attrL11n->setLanguage((string) (
|
||||||
$request->getData('language') ?? $request->getLanguage()
|
$request->getData('language') ?? $request->getLanguage()
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SupplierManagement\Models;
|
namespace Modules\SupplierManagement\Models;
|
||||||
|
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
|
||||||
use phpOMS\Localization\BaseStringL11n;
|
use phpOMS\Localization\BaseStringL11n;
|
||||||
|
use phpOMS\Localization\ISO639x1Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supplier Attribute Type class.
|
* Supplier Attribute Type class.
|
||||||
|
|
@ -113,7 +113,7 @@ class SupplierAttributeType implements \JsonSerializable
|
||||||
* Set l11n
|
* Set l11n
|
||||||
*
|
*
|
||||||
* @param string|BaseStringL11n $l11n Tag article l11n
|
* @param string|BaseStringL11n $l11n Tag article l11n
|
||||||
* @param string $lang Language
|
* @param string $lang Language
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
|
@ -126,7 +126,7 @@ class SupplierAttributeType implements \JsonSerializable
|
||||||
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
} else {
|
} else {
|
||||||
$this->l11n = new BaseStringL11n();
|
$this->l11n = new BaseStringL11n();
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->setLanguage($lang);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,13 @@ final class SupplierAttributeTypeMapper extends DataMapperFactory
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const COLUMNS = [
|
public const COLUMNS = [
|
||||||
'suppliermgmt_attr_type_id' => ['name' => 'suppliermgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'],
|
'suppliermgmt_attr_type_id' => ['name' => 'suppliermgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'suppliermgmt_attr_type_name' => ['name' => 'suppliermgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
'suppliermgmt_attr_type_name' => ['name' => 'suppliermgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true],
|
||||||
'suppliermgmt_attr_type_datatype' => ['name' => 'suppliermgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
'suppliermgmt_attr_type_datatype' => ['name' => 'suppliermgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'],
|
||||||
'suppliermgmt_attr_type_fields' => ['name' => 'suppliermgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
'suppliermgmt_attr_type_fields' => ['name' => 'suppliermgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'],
|
||||||
'suppliermgmt_attr_type_custom' => ['name' => 'suppliermgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
'suppliermgmt_attr_type_custom' => ['name' => 'suppliermgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'],
|
||||||
'suppliermgmt_attr_type_pattern' => ['name' => 'suppliermgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
'suppliermgmt_attr_type_pattern' => ['name' => 'suppliermgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'],
|
||||||
'suppliermgmt_attr_type_required' => ['name' => 'suppliermgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
'suppliermgmt_attr_type_required' => ['name' => 'suppliermgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SupplierManagement\Models;
|
namespace Modules\SupplierManagement\Models;
|
||||||
|
|
||||||
use phpOMS\Localization\ISO3166TwoEnum;
|
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
use phpOMS\Localization\ISO639x1Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -100,7 +99,7 @@ class SupplierAttributeValue implements \JsonSerializable
|
||||||
* Set l11n
|
* Set l11n
|
||||||
*
|
*
|
||||||
* @param string|BaseStringL11n $l11n Tag article l11n
|
* @param string|BaseStringL11n $l11n Tag article l11n
|
||||||
* @param string $lang Language
|
* @param string $lang Language
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
|
@ -113,9 +112,9 @@ class SupplierAttributeValue implements \JsonSerializable
|
||||||
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
} else {
|
} else {
|
||||||
$this->l11n = new BaseStringL11n();
|
$this->l11n = new BaseStringL11n();
|
||||||
$this->l11n->content = $l11n;
|
$this->l11n->content = $l11n;
|
||||||
$this->l11n->ref = $this->id;
|
$this->l11n->ref = $this->id;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->setLanguage($lang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +135,7 @@ class SupplierAttributeValue implements \JsonSerializable
|
||||||
* Set value
|
* Set value
|
||||||
*
|
*
|
||||||
* @param int|string|float|\DateTimeInterface $value Value
|
* @param int|string|float|\DateTimeInterface $value Value
|
||||||
* @param int $type Datatype
|
* @param int $type Datatype
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ final class SupplierMapper extends DataMapperFactory
|
||||||
'suppliermgmt_supplier_created_at' => ['name' => 'suppliermgmt_supplier_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
'suppliermgmt_supplier_created_at' => ['name' => 'suppliermgmt_supplier_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||||
'suppliermgmt_supplier_profile' => ['name' => 'suppliermgmt_supplier_profile', 'type' => 'int', 'internal' => 'profile'],
|
'suppliermgmt_supplier_profile' => ['name' => 'suppliermgmt_supplier_profile', 'type' => 'int', 'internal' => 'profile'],
|
||||||
'suppliermgmt_supplier_address' => ['name' => 'suppliermgmt_supplier_address', 'type' => 'int', 'internal' => 'mainAddress'],
|
'suppliermgmt_supplier_address' => ['name' => 'suppliermgmt_supplier_address', 'type' => 'int', 'internal' => 'mainAddress'],
|
||||||
'suppliermgmt_supplier_unit' => ['name' => 'suppliermgmt_supplier_unit', 'type' => 'int', 'internal' => 'unit'],
|
'suppliermgmt_supplier_unit' => ['name' => 'suppliermgmt_supplier_unit', 'type' => 'int', 'internal' => 'unit'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SupplierManagement\tests\Controller\Api;
|
namespace Modules\SupplierManagement\tests\Controller\Api;
|
||||||
|
|
||||||
use Modules\SupplierManagement\Models\AttributeValueType;
|
|
||||||
use phpOMS\Localization\ISO3166TwoEnum;
|
use phpOMS\Localization\ISO3166TwoEnum;
|
||||||
use phpOMS\Localization\ISO639x1Enum;
|
use phpOMS\Localization\ISO639x1Enum;
|
||||||
use phpOMS\Message\Http\HttpRequest;
|
use phpOMS\Message\Http\HttpRequest;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\SupplierManagement\tests\Models;
|
namespace Modules\SupplierManagement\tests\Models;
|
||||||
|
|
||||||
use Modules\SupplierManagement\Models\SupplierAttributeValue;
|
|
||||||
use Modules\SupplierManagement\Models\AttributeValueType;
|
use Modules\SupplierManagement\Models\AttributeValueType;
|
||||||
|
use Modules\SupplierManagement\Models\SupplierAttributeValue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user