From ccac76d312b2f38ec0ea4747de4565e9e5a7c420 Mon Sep 17 00:00:00 2001 From: Daniel Kurowski Date: Fri, 5 Jan 2024 14:33:10 +0100 Subject: [PATCH] administration units: introduce getCategory() getter and deprecated is*() --- src/AdministrationUnit/Response/AdministrationUnit.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/AdministrationUnit/Response/AdministrationUnit.php b/src/AdministrationUnit/Response/AdministrationUnit.php index a39d3d4..8ff977e 100644 --- a/src/AdministrationUnit/Response/AdministrationUnit.php +++ b/src/AdministrationUnit/Response/AdministrationUnit.php @@ -171,24 +171,34 @@ public function getManager(): ?string } + public function getCategory(): Category + { + return $this->category; + } + + + /** @deprecated use {@see self::getCategory()} instead */ public function isClub(): bool { return $this->category->equals(Category::CLUB()); } + /** @deprecated use {@see self::getCategory()} instead */ public function isBaseUnit(): bool { return $this->category->equals(Category::BASIC_SECTION()); } + /** @deprecated use {@see self::getCategory()} instead */ public function isRegionalUnit(): bool { return $this->category->equals(Category::REGIONAL_CENTER()); } + /** @deprecated use {@see self::getCategory()} instead */ public function isOffice(): bool { return $this->category->equals(Category::HEADQUARTER());