mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-02-15 16:28:40 +00:00
fix phpstan/phpcs
This commit is contained in:
parent
b01877046c
commit
f4c3e8c882
|
|
@ -68,9 +68,7 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface
|
||||||
*
|
*
|
||||||
* @var string | ClientAttributeTypeL11n
|
* @var string | ClientAttributeTypeL11n
|
||||||
*/
|
*/
|
||||||
protected string |
|
protected string|ClientAttributeTypeL11n $l11n;
|
||||||
|
|
||||||
ClientAttributeTypeL11n $l11n;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Possible default attribute values
|
* Possible default attribute values
|
||||||
|
|
@ -113,16 +111,16 @@ class ClientAttributeType implements \JsonSerializable, ArrayableInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setL11n($l11n, string $lang = ISO639x1Enum::_EN) : void
|
public function setL11n(string|ClientAttributeTypeL11n $l11n, string $lang = ISO639x1Enum::_EN) : void
|
||||||
{
|
{
|
||||||
if ($l11n instanceof ClientAttributeTypeL11n) {
|
if ($l11n instanceof ClientAttributeTypeL11n) {
|
||||||
$this->l11n = $l11n;
|
$this->l11n = $l11n;
|
||||||
} elseif (\is_string($l11n)) {
|
} elseif ($this->l11n instanceof ClientAttributeTypeL11n) {
|
||||||
|
$this->l11n->title = $l11n;
|
||||||
|
} else {
|
||||||
$this->l11n = new ClientAttributeTypeL11n();
|
$this->l11n = new ClientAttributeTypeL11n();
|
||||||
$this->l11n->title = $l11n;
|
$this->l11n->title = $l11n;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->setLanguage($lang);
|
||||||
} elseif ($this->l11n instanceof ClientAttributeTypeL11n && \is_string($l11n)) {
|
|
||||||
$this->l11n->title = $l11n;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,7 @@ class ClientAttributeTypeL11n implements \JsonSerializable, ArrayableInterface
|
||||||
* @var int|ClientAttributeType
|
* @var int|ClientAttributeType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int |
|
protected int|ClientAttributeType $type = 0;
|
||||||
|
|
||||||
ClientAttributeType $type = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language.
|
* Language.
|
||||||
|
|
|
||||||
|
|
@ -153,6 +153,13 @@ class ClientAttributeValue implements \JsonSerializable, ArrayableInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get value
|
||||||
|
*
|
||||||
|
* @return null|int|string|float|\DateTimeInterface
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getValue() : mixed
|
public function getValue() : mixed
|
||||||
{
|
{
|
||||||
if (!empty($this->valueStr)) {
|
if (!empty($this->valueStr)) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
],
|
],
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": ">=9.4",
|
"phpunit/phpunit": ">=9.4",
|
||||||
"friendsofphp/php-cs-fixer": ">=2.18",
|
"friendsofphp/php-cs-fixer": ">=3.0",
|
||||||
"squizlabs/php_codesniffer": ">=3.5",
|
"squizlabs/php_codesniffer": ">=3.5",
|
||||||
"phpmd/phpmd": ">=2.9",
|
"phpmd/phpmd": ">=2.9",
|
||||||
"phpstan/phpstan": ">=0.12.58",
|
"phpstan/phpstan": ">=0.12.58",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user