From f04e9fa4cabe1daeec5c9589ab0a6516dda34704 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Fri, 19 Jan 2024 10:01:38 +1300 Subject: [PATCH] ENH Add generic types (#220) --- src/Extensions/ContentReviewCMSExtension.php | 3 +++ src/Extensions/ContentReviewDefaultSettings.php | 9 ++++++--- src/Extensions/ContentReviewLeftAndMainExtension.php | 4 ++++ src/Extensions/ContentReviewOwner.php | 4 ++++ src/Extensions/SiteTreeContentReview.php | 10 ++++++---- 5 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/Extensions/ContentReviewCMSExtension.php b/src/Extensions/ContentReviewCMSExtension.php index d37a4ef..2a90896 100644 --- a/src/Extensions/ContentReviewCMSExtension.php +++ b/src/Extensions/ContentReviewCMSExtension.php @@ -4,6 +4,7 @@ namespace SilverStripe\ContentReview\Extensions; use SilverStripe\Admin\LeftAndMain; use SilverStripe\Admin\LeftAndMainExtension; +use SilverStripe\CMS\Controllers\CMSMain; use SilverStripe\CMS\Model\SiteTree; use SilverStripe\ContentReview\Forms\ReviewContentHandler; use SilverStripe\ContentReview\Traits\PermissionChecker; @@ -17,6 +18,8 @@ use SilverStripe\Security\Security; /** * CMSPageEditController extension to receive the additional action button from * SiteTreeContentReview::updateCMSActions() + * + * @extends LeftAndMainExtension */ class ContentReviewCMSExtension extends LeftAndMainExtension { diff --git a/src/Extensions/ContentReviewDefaultSettings.php b/src/Extensions/ContentReviewDefaultSettings.php index bfa446a..9dfecb6 100644 --- a/src/Extensions/ContentReviewDefaultSettings.php +++ b/src/Extensions/ContentReviewDefaultSettings.php @@ -14,6 +14,7 @@ use SilverStripe\ORM\DataExtension; use SilverStripe\Security\Group; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; +use SilverStripe\SiteConfig\SiteConfig; /** * This extensions add a default schema for new pages and pages without a content @@ -22,6 +23,8 @@ use SilverStripe\Security\Permission; * @property int $ReviewPeriodDays * @method SilverStripe\ORM\ManyManyList ContentReviewGroups() * @method SilverStripe\ORM\ManyManyList ContentReviewUsers() + * + * @extends DataExtension */ class ContentReviewDefaultSettings extends DataExtension { @@ -88,7 +91,7 @@ class ContentReviewDefaultSettings extends DataExtension } /** - * @return ManyManyList + * @return ManyManyList */ public function OwnerGroups() { @@ -96,7 +99,7 @@ class ContentReviewDefaultSettings extends DataExtension } /** - * @return ManyManyList + * @return ManyManyList */ public function OwnerUsers() { @@ -180,7 +183,7 @@ class ContentReviewDefaultSettings extends DataExtension * Get all Members that are default Content Owners. This includes checking group hierarchy * and adding any direct users. * - * @return ArrayList + * @return ArrayList */ public function ContentReviewOwners() { diff --git a/src/Extensions/ContentReviewLeftAndMainExtension.php b/src/Extensions/ContentReviewLeftAndMainExtension.php index 03ce9d1..e882b16 100644 --- a/src/Extensions/ContentReviewLeftAndMainExtension.php +++ b/src/Extensions/ContentReviewLeftAndMainExtension.php @@ -2,8 +2,12 @@ namespace SilverStripe\ContentReview\Extensions; +use SilverStripe\Admin\LeftAndMain; use SilverStripe\Admin\LeftAndMainExtension; +/** + * @extends LeftAndMainExtension + */ class ContentReviewLeftAndMainExtension extends LeftAndMainExtension { /** diff --git a/src/Extensions/ContentReviewOwner.php b/src/Extensions/ContentReviewOwner.php index d6d58f5..5e3a67e 100644 --- a/src/Extensions/ContentReviewOwner.php +++ b/src/Extensions/ContentReviewOwner.php @@ -5,9 +5,13 @@ namespace SilverStripe\ContentReview\Extensions; use SilverStripe\CMS\Model\SiteTree; use SilverStripe\Forms\FieldList; use SilverStripe\ORM\DataExtension; +use SilverStripe\Security\Group; +use SilverStripe\Security\Member; /** * @method SilverStripe\ORM\ManyManyList SiteTreeContentReview() + * + * @extends DataExtension */ class ContentReviewOwner extends DataExtension { diff --git a/src/Extensions/SiteTreeContentReview.php b/src/Extensions/SiteTreeContentReview.php index 687625a..f4698da 100644 --- a/src/Extensions/SiteTreeContentReview.php +++ b/src/Extensions/SiteTreeContentReview.php @@ -53,6 +53,8 @@ use Symbiote\QueuedJobs\Services\QueuedJobService; * @method SilverStripe\ORM\ManyManyList ContentReviewGroups() * @method SilverStripe\ORM\ManyManyList ContentReviewUsers() * @method SilverStripe\ORM\HasManyList ReviewLogs() + * + * @extends DataExtension */ class SiteTreeContentReview extends DataExtension implements PermissionProvider { @@ -119,7 +121,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider * @param SS_List $groups * @param SS_List $members * - * @return ArrayList + * @return ArrayList */ public static function merge_owners(SS_List $groups, SS_List $members) { @@ -293,7 +295,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider * Get all Members that are Content Owners to this page. This includes checking group * hierarchy and adding any direct users. * - * @return ArrayList + * @return ArrayList */ public function ContentReviewOwners() { @@ -304,7 +306,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider } /** - * @return ManyManyList + * @return ManyManyList */ public function OwnerGroups() { @@ -312,7 +314,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider } /** - * @return ManyManyList + * @return ManyManyList */ public function OwnerUsers() {