mirror of
https://github.com/Karaka-Management/oms-ContractManagement.git
synced 2026-02-17 02:48:40 +00:00
fix phpstan/phpcs
This commit is contained in:
parent
8b33381d0c
commit
4838f51422
|
|
@ -48,9 +48,7 @@ class ContractType implements \JsonSerializable, ArrayableInterface
|
||||||
*
|
*
|
||||||
* @var ContractTypeL11n
|
* @var ContractTypeL11n
|
||||||
*/
|
*/
|
||||||
protected string |
|
protected string | ContractTypeL11n $l11n;
|
||||||
|
|
||||||
ContractTypeL11n $l11n;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
|
|
@ -88,16 +86,16 @@ class ContractType implements \JsonSerializable, ArrayableInterface
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function setL11n($l11n, string $lang = ISO639x1Enum::_EN) : void
|
public function setL11n(string|ContractTypeL11n $l11n, string $lang = ISO639x1Enum::_EN) : void
|
||||||
{
|
{
|
||||||
if ($l11n instanceof ContractTypeL11n) {
|
if ($l11n instanceof ContractTypeL11n) {
|
||||||
$this->l11n = $l11n;
|
$this->l11n = $l11n;
|
||||||
} elseif (\is_string($l11n)) {
|
} elseif ($this->l11n instanceof ContractTypeL11n) {
|
||||||
|
$this->l11n->title = $l11n;
|
||||||
|
} else {
|
||||||
$this->l11n = new ContractTypeL11n();
|
$this->l11n = new ContractTypeL11n();
|
||||||
$this->l11n->title = $l11n;
|
$this->l11n->title = $l11n;
|
||||||
$this->l11n->setLanguage($lang);
|
$this->l11n->setLanguage($lang);
|
||||||
} elseif ($this->l11n instanceof ContractTypeL11n && \is_string($l11n)) {
|
|
||||||
$this->l11n->title = $l11n;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,7 @@ class ContractTypeL11n implements \JsonSerializable, ArrayableInterface
|
||||||
* @var int|ContractType
|
* @var int|ContractType
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int |
|
protected int | ContractType $type = 0;
|
||||||
|
|
||||||
ContractType $type = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Language.
|
* Language.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user