diff --git a/Controller/ApiController.php b/Controller/ApiController.php index d5bd670..27e0026 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -20,7 +20,6 @@ use Modules\ClientManagement\Models\Client; use Modules\ClientManagement\Models\ClientAttribute; use Modules\ClientManagement\Models\ClientAttributeMapper; use Modules\ClientManagement\Models\ClientAttributeType; -use phpOMS\Localization\BaseStringL11n; use Modules\ClientManagement\Models\ClientAttributeTypeL11nMapper; use Modules\ClientManagement\Models\ClientAttributeTypeMapper; use Modules\ClientManagement\Models\ClientAttributeValue; @@ -31,6 +30,7 @@ use Modules\ClientManagement\Models\NullClientAttributeValue; use Modules\Media\Models\PathSettings; use Modules\Profile\Models\ContactElementMapper; use Modules\Profile\Models\Profile; +use phpOMS\Localization\BaseStringL11n; use phpOMS\Localization\ISO639x1Enum; use phpOMS\Message\Http\RequestStatusCode; use phpOMS\Message\NotificationLevel; @@ -273,7 +273,7 @@ final class ApiController extends Controller private function createClientAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n { $attrL11n = new BaseStringL11n(); - $attrL11n->ref = (int) ($request->getData('type') ?? 0); + $attrL11n->ref = (int) ($request->getData('type') ?? 0); $attrL11n->setLanguage((string) ( $request->getData('language') ?? $request->getLanguage() )); @@ -426,7 +426,7 @@ final class ApiController extends Controller ->where('id', (int) ($request->getData('type') ?? 0)) ->execute(); - $attrValue = new ClientAttributeValue(); + $attrValue = new ClientAttributeValue(); $attrValue->isDefault = (bool) ($request->getData('default') ?? false); $attrValue->setValue($request->getData('value'), $type->datatype); @@ -497,7 +497,7 @@ final class ApiController extends Controller private function createClientAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n { $attrL11n = new BaseStringL11n(); - $attrL11n->ref = (int) ($request->getData('value') ?? 0); + $attrL11n->ref = (int) ($request->getData('value') ?? 0); $attrL11n->setLanguage((string) ( $request->getData('language') ?? $request->getLanguage() )); diff --git a/Models/ClientAttributeType.php b/Models/ClientAttributeType.php index fbd91c0..d19ec9b 100755 --- a/Models/ClientAttributeType.php +++ b/Models/ClientAttributeType.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Modules\ClientManagement\Models; -use phpOMS\Localization\ISO639x1Enum; use phpOMS\Localization\BaseStringL11n; +use phpOMS\Localization\ISO639x1Enum; /** * Client Attribute Type class. @@ -114,7 +114,7 @@ class ClientAttributeType implements \JsonSerializable * Set l11n * * @param string|BaseStringL11n $l11n Tag article l11n - * @param string $lang Language + * @param string $lang Language * * @return void * @@ -127,7 +127,7 @@ class ClientAttributeType implements \JsonSerializable } elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) { $this->l11n->content = $l11n; } else { - $this->l11n = new BaseStringL11n(); + $this->l11n = new BaseStringL11n(); $this->l11n->content = $l11n; $this->l11n->setLanguage($lang); } diff --git a/Models/ClientAttributeTypeMapper.php b/Models/ClientAttributeTypeMapper.php index 8394c77..bb4e14a 100755 --- a/Models/ClientAttributeTypeMapper.php +++ b/Models/ClientAttributeTypeMapper.php @@ -33,13 +33,13 @@ final class ClientAttributeTypeMapper extends DataMapperFactory * @since 1.0.0 */ public const COLUMNS = [ - 'clientmgmt_attr_type_id' => ['name' => 'clientmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'], - 'clientmgmt_attr_type_name' => ['name' => 'clientmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], + 'clientmgmt_attr_type_id' => ['name' => 'clientmgmt_attr_type_id', 'type' => 'int', 'internal' => 'id'], + 'clientmgmt_attr_type_name' => ['name' => 'clientmgmt_attr_type_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'clientmgmt_attr_type_datatype' => ['name' => 'clientmgmt_attr_type_datatype', 'type' => 'int', 'internal' => 'datatype'], - 'clientmgmt_attr_type_fields' => ['name' => 'clientmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], - 'clientmgmt_attr_type_custom' => ['name' => 'clientmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], - 'clientmgmt_attr_type_pattern' => ['name' => 'clientmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'], - 'clientmgmt_attr_type_required' => ['name' => 'clientmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], + 'clientmgmt_attr_type_fields' => ['name' => 'clientmgmt_attr_type_fields', 'type' => 'int', 'internal' => 'fields'], + 'clientmgmt_attr_type_custom' => ['name' => 'clientmgmt_attr_type_custom', 'type' => 'bool', 'internal' => 'custom'], + 'clientmgmt_attr_type_pattern' => ['name' => 'clientmgmt_attr_type_pattern', 'type' => 'string', 'internal' => 'validationPattern'], + 'clientmgmt_attr_type_required' => ['name' => 'clientmgmt_attr_type_required', 'type' => 'bool', 'internal' => 'isRequired'], ]; /** diff --git a/Models/ClientAttributeValue.php b/Models/ClientAttributeValue.php index 1999df7..5f78dfb 100755 --- a/Models/ClientAttributeValue.php +++ b/Models/ClientAttributeValue.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Modules\ClientManagement\Models; -use phpOMS\Localization\ISO639x1Enum; use phpOMS\Localization\BaseStringL11n; +use phpOMS\Localization\ISO639x1Enum; /** * Client attribute value class. @@ -124,7 +124,7 @@ class ClientAttributeValue implements \JsonSerializable * Set l11n * * @param string|BaseStringL11n $l11n Tag article l11n - * @param string $lang Language + * @param string $lang Language * * @return void * @@ -137,9 +137,9 @@ class ClientAttributeValue implements \JsonSerializable } elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) { $this->l11n->content = $l11n; } else { - $this->l11n = new BaseStringL11n(); + $this->l11n = new BaseStringL11n(); $this->l11n->content = $l11n; - $this->l11n->ref = $this->id; + $this->l11n->ref = $this->id; $this->l11n->setLanguage($lang); } } @@ -160,7 +160,7 @@ class ClientAttributeValue implements \JsonSerializable * Set value * * @param int|string|float|\DateTimeInterface $value Value - * @param int $type Datatype + * @param int $type Datatype * * @return void * diff --git a/Models/ClientMapper.php b/Models/ClientMapper.php index a994f80..0753095 100755 --- a/Models/ClientMapper.php +++ b/Models/ClientMapper.php @@ -47,7 +47,7 @@ final class ClientMapper extends DataMapperFactory 'clientmgmt_client_created_at' => ['name' => 'clientmgmt_client_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'clientmgmt_client_profile' => ['name' => 'clientmgmt_client_profile', 'type' => 'int', 'internal' => 'profile'], 'clientmgmt_client_address' => ['name' => 'clientmgmt_client_address', 'type' => 'int', 'internal' => 'mainAddress'], - 'clientmgmt_client_unit' => ['name' => 'clientmgmt_client_unit', 'type' => 'int', 'internal' => 'unit'], + 'clientmgmt_client_unit' => ['name' => 'clientmgmt_client_unit', 'type' => 'int', 'internal' => 'unit'], ]; /** diff --git a/tests/Controller/Api/ApiControllerAttributeTrait.php b/tests/Controller/Api/ApiControllerAttributeTrait.php index e2634e0..963c0cb 100755 --- a/tests/Controller/Api/ApiControllerAttributeTrait.php +++ b/tests/Controller/Api/ApiControllerAttributeTrait.php @@ -14,7 +14,6 @@ declare(strict_types=1); namespace Modules\ClientManagement\tests\Controller\Api; -use Modules\ClientManagement\Models\AttributeValueType; use phpOMS\Localization\ISO3166TwoEnum; use phpOMS\Localization\ISO639x1Enum; use phpOMS\Message\Http\HttpRequest; diff --git a/tests/Models/ClientAttributeValueTest.php b/tests/Models/ClientAttributeValueTest.php index 9947df4..069aac4 100755 --- a/tests/Models/ClientAttributeValueTest.php +++ b/tests/Models/ClientAttributeValueTest.php @@ -14,8 +14,8 @@ declare(strict_types=1); namespace Modules\ClientManagement\tests\Models; -use Modules\ClientManagement\Models\ClientAttributeValue; use Modules\ClientManagement\Models\AttributeValueType; +use Modules\ClientManagement\Models\ClientAttributeValue; /** * @internal