From d2f717140e6fc792838d125e78f607fefb31a545 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Fri, 12 Jan 2024 12:32:53 +1300 Subject: [PATCH] ENH Add generic types --- src/Controllers/TaxonomyDirectoryController.php | 3 +++ src/TaxonomyTerm.php | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Controllers/TaxonomyDirectoryController.php b/src/Controllers/TaxonomyDirectoryController.php index 20bbf03..df83ce9 100644 --- a/src/Controllers/TaxonomyDirectoryController.php +++ b/src/Controllers/TaxonomyDirectoryController.php @@ -17,6 +17,9 @@ * Class TaxonomyDirectoryController * * Controller for returning a list of pages tagged with a specific Taxonomy Term + * + * @template T + * @extends PageController */ class TaxonomyDirectoryController extends PageController { diff --git a/src/TaxonomyTerm.php b/src/TaxonomyTerm.php index 1c4282d..593470a 100644 --- a/src/TaxonomyTerm.php +++ b/src/TaxonomyTerm.php @@ -160,7 +160,6 @@ public function onBeforeDelete() parent::onBeforeDelete(); foreach ($this->Children() as $term) { - /** @var TaxonomyTerm $term */ $term->delete(); } } @@ -200,7 +199,6 @@ public function onAfterWrite() // Write the current term's type to all children foreach ($this->Children() as $term) { - /** @var TaxonomyTerm $term */ $term->TypeID = $this->Type()->ID; $term->write(); }