From c8200a0aad71c3c186acd7f24e611ef65e88b047 Mon Sep 17 00:00:00 2001 From: Cameron Bryers <12287346+Cambis@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:08:15 +1300 Subject: [PATCH 1/3] feat: rename file to match classname --- src/Tasks/{TruncateTaxonomyTask.php => ClearTaxonomyTask.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/Tasks/{TruncateTaxonomyTask.php => ClearTaxonomyTask.php} (100%) diff --git a/src/Tasks/TruncateTaxonomyTask.php b/src/Tasks/ClearTaxonomyTask.php similarity index 100% rename from src/Tasks/TruncateTaxonomyTask.php rename to src/Tasks/ClearTaxonomyTask.php From 0061341e9170bc79b4c533a211c23a7d17dbb6ab Mon Sep 17 00:00:00 2001 From: Cameron Bryers <12287346+Cambis@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:16:04 +1300 Subject: [PATCH 2/3] feat: complete annotations for TaxonomyTerm --- src/Model/TaxonomyTerm.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Model/TaxonomyTerm.php b/src/Model/TaxonomyTerm.php index 31f99ac..6e3455f 100644 --- a/src/Model/TaxonomyTerm.php +++ b/src/Model/TaxonomyTerm.php @@ -13,8 +13,10 @@ * Represents a single taxonomy term. Can be re-ordered in the CMS, and the default sorting is to use the order as * specified in the CMS. * - * @property string $Name + * @property ?string $Name * @property int $Sort + * @property bool $Protected + * @method TaxonomyType Type() * @property int $TypeID */ class TaxonomyTerm extends DataObject implements PermissionProvider From 6bba1a0e7a8aa5c7fc854db965aaa73e984024cb Mon Sep 17 00:00:00 2001 From: Cameron Bryers <12287346+Cambis@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:23:47 +1300 Subject: [PATCH 3/3] feat: update types for TaxonomyTrait --- src/Traits/TaxonomyTrait.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Traits/TaxonomyTrait.php b/src/Traits/TaxonomyTrait.php index f9500fd..e90cbb8 100644 --- a/src/Traits/TaxonomyTrait.php +++ b/src/Traits/TaxonomyTrait.php @@ -12,8 +12,8 @@ trait TaxonomyTrait /** * Helper to find a taxonomy type either by ID or name * - * @param int|String $type - * @return TaxonomyType + * @param int|string $type + * @return ?TaxonomyType */ public static function findTaxonomyType($type) { @@ -27,8 +27,8 @@ public static function findTaxonomyType($type) /** * Return taxonomy terms for a type specified as a string * - * @param string $type - * @return DataList + * @param int|string $type + * @return ArrayList|DataList */ public static function getTermsForType($type) {