From 90e9bbe33d7d1ef81fae8e02c71b3a43de6c07cc Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 7 Oct 2021 13:22:06 -0400 Subject: [PATCH] Afform - Add array shape annotations to FormDataModel --- ext/afform/core/Civi/Afform/FormDataModel.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ext/afform/core/Civi/Afform/FormDataModel.php b/ext/afform/core/Civi/Afform/FormDataModel.php index a0d93dad53..3feade32dc 100644 --- a/ext/afform/core/Civi/Afform/FormDataModel.php +++ b/ext/afform/core/Civi/Afform/FormDataModel.php @@ -16,7 +16,7 @@ class FormDataModel { protected $defaults = ['security' => 'RBAC', 'actions' => ['create' => TRUE, 'update' => TRUE]]; /** - * @var array + * @var array[] * Ex: $entities['spouse']['type'] = 'Contact'; */ protected $entities; @@ -27,7 +27,7 @@ class FormDataModel { protected $blocks = []; /** - * @var array + * @var array[] */ protected $searchDisplays = []; @@ -193,14 +193,14 @@ class FormDataModel { } /** - * @return array + * @return array{type: string, fields: array, joins: array, security: string, actions: array} */ public function getEntity($entityName) { return $this->entities[$entityName] ?? NULL; } /** - * @return array + * @return array{fields: array, searchName: string} */ public function getSearchDisplay($displayName) { return $this->searchDisplays[$displayName] ?? NULL; -- 2.25.1