From 8acf761b17e0ea107461a52e5000531228a28b22 Mon Sep 17 00:00:00 2001
From: TickTackk <me@ticktackk.io>
Date: Fri, 15 Apr 2022 15:05:15 +0530
Subject: [PATCH 1/2] Increase version

---
 addon.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/addon.json b/addon.json
index 58c2cc1..dc0061e 100644
--- a/addon.json
+++ b/addon.json
@@ -2,8 +2,8 @@
     "legacy_addon_id": "",
     "title": "Developer Tools",
     "description": "This add-on provides enhancements for add-on developers.",
-    "version_id": 1040170,
-    "version_string": "1.4.1",
+    "version_id": 1040270,
+    "version_string": "1.4.2",
     "dev": "TickTackk",
     "dev_url": "https://xenforo.com/community/members/90375/",
     "faq_url": "",

From 82aaf57aaf7ee4c9794c7785145f0320e7df4084 Mon Sep 17 00:00:00 2001
From: TickTackk <me@ticktackk.io>
Date: Fri, 15 Apr 2022 15:06:39 +0530
Subject: [PATCH 2/2] closes #120

---
 CHANGELOG.md                          | 4 ++++
 Cli/Command/EntityClassProperties.php | 8 +++++++-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 265853f..8511546 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
 CHANGELOG
 ==========================
 
+## 1.4.2 (`1040270`)
+
+- **Fix:** Command `tck-dt:entity-class-properties` duplicates class hint for getters (#120)
+
 ## 1.4.1 (`1040170`)
 
 - **Fix:** Command `tck-devtools:create-entity-from-table` marks auto increment primary key as required (#118)
diff --git a/Cli/Command/EntityClassProperties.php b/Cli/Command/EntityClassProperties.php
index f0b681b..b0c56f8 100644
--- a/Cli/Command/EntityClassProperties.php
+++ b/Cli/Command/EntityClassProperties.php
@@ -256,6 +256,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
                             $newType[] = '\\' . $class . ($isMulti ? '[]' : '');
                         }
                     }
+                    $newType = array_unique($newType);
 
                     $type = implode('|', $newType);
                 }
@@ -279,6 +280,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
                     'type' => !empty($def['typeHint']) ? $def['typeHint'] : $typeMap[$def['type']],
                     'null' => !empty($def['nullable'])
                 ];
+
                 if (array_key_exists('list', $def)
                     && array_key_exists('type', $def['list'])
                     && isset($listMap[$def['list']['type']])
@@ -286,6 +288,10 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
                 {
                     $columns[$column]['type'] = 'array|' . $listMap[$def['list']['type']] . '[]';
                 }
+                else if ($def['type'] === Entity::STR && array_key_exists('censor', $def))
+                {
+                    $columns[$column . '_'] = $columns[$column];
+                }
             }
 
             $relations = [];
@@ -452,7 +458,7 @@ protected function getAllClassesExtendingClass(
             $classes[] = $classExtension->to_class;
         }
 
-        return $classes;
+        return array_unique($classes);
     }
 
     /**