Skip to content

Commit

Permalink
Merge pull request #121 from ticktackk/develop
Browse files Browse the repository at this point in the history
1.4.2
  • Loading branch information
ticktackk authored Apr 15, 2022
2 parents 89958fc + 82aaf57 commit 1b746d4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
8 changes: 7 additions & 1 deletion Cli/Command/EntityClassProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ protected function execute(InputInterface $input, OutputInterface $output) : int
$newType[] = '\\' . $class . ($isMulti ? '[]' : '');
}
}
$newType = array_unique($newType);

$type = implode('|', $newType);
}
Expand All @@ -279,13 +280,18 @@ 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']])
)
{
$columns[$column]['type'] = 'array|' . $listMap[$def['list']['type']] . '[]';
}
else if ($def['type'] === Entity::STR && array_key_exists('censor', $def))
{
$columns[$column . '_'] = $columns[$column];
}
}

$relations = [];
Expand Down Expand Up @@ -452,7 +458,7 @@ protected function getAllClassesExtendingClass(
$classes[] = $classExtension->to_class;
}

return $classes;
return array_unique($classes);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions addon.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down

0 comments on commit 1b746d4

Please sign in to comment.