From f040f76f9a8534362318ff8bd41bda673743c1ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Proch=C3=A1zka?= Date: Fri, 9 Feb 2024 11:41:35 +0100 Subject: [PATCH] Swtich to Parametrized trait --- src/Entity/Record.php | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/Entity/Record.php b/src/Entity/Record.php index 7e0aae5..754585f 100644 --- a/src/Entity/Record.php +++ b/src/Entity/Record.php @@ -25,6 +25,7 @@ abstract class Record { use Tools\Identifier; use Tools\Ownership; + use Tools\Parametrized; use Tools\Hashable; #[ORM\Column(type: 'string', length: 16, enumType: Type::class)] @@ -51,9 +52,6 @@ abstract class Record #[ORM\Column(type: 'boolean')] protected bool $isFinished = false; - #[ORM\Column(type: 'json', nullable: true)] - protected ?array $params = null; - #[ORM\Column(type: 'text', nullable: true)] protected ?string $note = null; @@ -222,18 +220,6 @@ public function addParams(array $params): void } - public function getParams(): array - { - return $this->params ?: []; - } - - - public function getParam(string $key): mixed - { - return $this->params[$key] ?? null; - } - - public function getParamsUnified(): array { return Arrays::flatten($this->getParams());