diff --git a/src/MemberReportExtension.php b/src/MemberReportExtension.php index b9e48c9..d266f2d 100644 --- a/src/MemberReportExtension.php +++ b/src/MemberReportExtension.php @@ -6,11 +6,14 @@ use SilverStripe\Security\Group; use SilverStripe\Security\Permission; use SilverStripe\Security\LoginAttempt; +use SilverStripe\Security\Member; use SilverStripe\Subsites\Model\Subsite; /** * Extends the {@see Member} class with additional descriptions for elements. * See {@see UserSecurityReport} for usage. + * + * @extends DataExtension */ class MemberReportExtension extends DataExtension { @@ -63,7 +66,6 @@ public function getGroupsDescription() // Collect the group names $groupNames = array(); foreach ($groups as $group) { - /** @var Group $group */ $groupNames[] = html_entity_decode($group->getTreeTitle() ?? ''); } // return a csv string of the group names, sans-markup diff --git a/src/Subsites/SubsiteMemberReportExtension.php b/src/Subsites/SubsiteMemberReportExtension.php index e74166a..f491988 100644 --- a/src/Subsites/SubsiteMemberReportExtension.php +++ b/src/Subsites/SubsiteMemberReportExtension.php @@ -3,16 +3,19 @@ namespace SilverStripe\SecurityReport\Subsites; use SilverStripe\ORM\DataExtension; +use SilverStripe\Security\Member; use SilverStripe\Subsites\Model\Subsite; /** * Adds 'SubsiteDescription' for to show which subsites this Member has edit access to * * @author Damian Mooyman + * + * @extends DataExtension */ class SubsiteMemberReportExtension extends DataExtension { - + /** * Set cast of additional field * @@ -22,7 +25,7 @@ class SubsiteMemberReportExtension extends DataExtension private static $casting = array( 'SubsiteDescription' => 'Text' ); - + /** * Default permission to filter for * @@ -30,7 +33,7 @@ class SubsiteMemberReportExtension extends DataExtension * @config */ private static $subsite_description_permission = 'SITETREE_EDIT_ALL'; - + /** * Describes the subsites this user has SITETREE_EDIT_ALL access to * diff --git a/src/UserSecurityReport.php b/src/UserSecurityReport.php index 726b5bf..f9315cc 100644 --- a/src/UserSecurityReport.php +++ b/src/UserSecurityReport.php @@ -38,7 +38,7 @@ class UserSecurityReport extends Report 'GroupsDescription' => 'Groups', 'PermissionsDescription' => 'Permissions', ); - + protected $dataClass = Member::class; /** @@ -110,7 +110,7 @@ public function sortColumns() /** * Get the source records for the report gridfield * - * @return DataList + * @return DataList */ public function sourceRecords() { @@ -133,11 +133,10 @@ public function canView($member = null) * Return a field, such as a {@link GridField} that is * used to show and manipulate data relating to this report. * - * @return FormField subclass + * @return GridField subclass */ public function getReportField() { - /** @var GridField $gridField */ $gridField = parent::getReportField(); $gridField->setModelClass(self::class); $gridConfig = $gridField->getConfig(); diff --git a/tests/php/UserSecurityReportTest.php b/tests/php/UserSecurityReportTest.php index 6cee0de..9fa143c 100644 --- a/tests/php/UserSecurityReportTest.php +++ b/tests/php/UserSecurityReportTest.php @@ -40,8 +40,6 @@ class UserSecurityReportTest extends SapphireTest /** * Utility method for all tests to use. - * - * @return ArrayList */ protected function setUp(): void {