Skip to content

Commit 1b746d4

Browse files
authored
Merge pull request #121 from ticktackk/develop
1.4.2
2 parents 89958fc + 82aaf57 commit 1b746d4

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
CHANGELOG
22
==========================
33

4+
## 1.4.2 (`1040270`)
5+
6+
- **Fix:** Command `tck-dt:entity-class-properties` duplicates class hint for getters (#120)
7+
48
## 1.4.1 (`1040170`)
59

610
- **Fix:** Command `tck-devtools:create-entity-from-table` marks auto increment primary key as required (#118)

Cli/Command/EntityClassProperties.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
256256
$newType[] = '\\' . $class . ($isMulti ? '[]' : '');
257257
}
258258
}
259+
$newType = array_unique($newType);
259260

260261
$type = implode('|', $newType);
261262
}
@@ -279,13 +280,18 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
279280
'type' => !empty($def['typeHint']) ? $def['typeHint'] : $typeMap[$def['type']],
280281
'null' => !empty($def['nullable'])
281282
];
283+
282284
if (array_key_exists('list', $def)
283285
&& array_key_exists('type', $def['list'])
284286
&& isset($listMap[$def['list']['type']])
285287
)
286288
{
287289
$columns[$column]['type'] = 'array|' . $listMap[$def['list']['type']] . '[]';
288290
}
291+
else if ($def['type'] === Entity::STR && array_key_exists('censor', $def))
292+
{
293+
$columns[$column . '_'] = $columns[$column];
294+
}
289295
}
290296

291297
$relations = [];
@@ -452,7 +458,7 @@ protected function getAllClassesExtendingClass(
452458
$classes[] = $classExtension->to_class;
453459
}
454460

455-
return $classes;
461+
return array_unique($classes);
456462
}
457463

458464
/**

addon.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"legacy_addon_id": "",
33
"title": "Developer Tools",
44
"description": "This add-on provides enhancements for add-on developers.",
5-
"version_id": 1040170,
6-
"version_string": "1.4.1",
5+
"version_id": 1040270,
6+
"version_string": "1.4.2",
77
"dev": "TickTackk",
88
"dev_url": "https://xenforo.com/community/members/90375/",
99
"faq_url": "",

0 commit comments

Comments
 (0)