repositories cleanup and cs fix

This commit is contained in:
Yuri Kuznetsov
2021-04-21 13:03:53 +03:00
parent 9b1ae75a00
commit 2ff7825b34
12 changed files with 27 additions and 55 deletions
+2 -6
View File
@@ -40,11 +40,7 @@ class ArrayValue extends Database
{
protected $hooksDisabled = true;
protected $processFieldsAfterSaveDisabled = true;
protected $processFieldsAfterRemoveDisabled = true;
public function storeEntityAttribute(Entity $entity, string $attribute, bool $populateMode = false)
public function storeEntityAttribute(Entity $entity, string $attribute, bool $populateMode = false): void
{
if (!$entity->getAttributeType($attribute) === Entity::JSON_ARRAY) {
throw new Error("ArrayValue: Can't store non array attribute.");
@@ -130,7 +126,7 @@ class ArrayValue extends Database
}
}
public function deleteEntityAttribute(Entity $entity, string $attribute)
public function deleteEntityAttribute(Entity $entity, string $attribute): void
{
if (!$entity->id) {
throw new Error("ArrayValue: Can't delete {$attribute} w/o id given.");