Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Update @methods on class docblocks #11092

Closed
wants to merge 1 commit into from
Closed

Conversation

emteknetnz
Copy link
Member

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically good - just a question here about how we want to handle FQCN for lists when the list is already there in a use statement

@@ -24,7 +24,6 @@
*
* @property int $ParentID
* @property DataObject|Hierarchy $owner
* @method DataObject Parent()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one needs to stay - see the (non-standard) get_extra_config() method which is adding the has_one relation.

Comment on lines -50 to +55
* @method Group Parent() Return parent group
* @method HasManyList Permissions() List of group permissions
* @method HasManyList Groups() List of child groups
* @method ManyManyList Roles() List of PermissionRoles
* @mixin Hierarchy
* @method SilverStripe\ORM\HasManyList<Group> Groups()
* @method SilverStripe\ORM\ManyManyList<Member> Members()
* @method Group Parent()
* @method SilverStripe\ORM\HasManyList<Permission> Permissions()
* @method SilverStripe\ORM\ManyManyList<PermissionRole> Roles()
Copy link
Member

@GuySartorelli GuySartorelli Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HasManyList and ManyManyList are imported as use statements above (presumably specifically for the @method annotations)

If those use statements aren't used elsewhere, they should be removed.
Otherwise, we should probably just use the short form here in the @method annotations.

Since having extra use statements doesn't really cause any problems, it's just a little untidy - and same with unnecessary FQCN, I'll also accept it if you decide it's not worth changing the way your code writer handles this - in which case you can just mark this and the related items as resolved.

Comment on lines -13 to +16
* @method ManyManyList ViewerGroups()
* @method ManyManyList EditorGroups()
* @method ManyManyList ViewerMembers()
* @method ManyManyList EditorMembers()
* @method SilverStripe\ORM\ManyManyList<Group> EditorGroups()
* @method SilverStripe\ORM\ManyManyList<Member> EditorMembers()
* @method SilverStripe\ORM\ManyManyList<Group> ViewerGroups()
* @method SilverStripe\ORM\ManyManyList<Member> ViewerMembers()
Copy link
Member

@GuySartorelli GuySartorelli Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment and perform the same actions here as you will there.

Comment on lines +58 to +60
* @method SilverStripe\ORM\ManyManyList<Group> Groups()
* @method SilverStripe\ORM\HasManyList<MemberPassword> LoggedPasswords()
* @method SilverStripe\ORM\HasManyList<RememberLoginHash> RememberLoginHashes()
Copy link
Member

@GuySartorelli GuySartorelli Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment and perform the same actions here as you will there.

Comment on lines -23 to +24
* @method HasManyList Codes() List of PermissionRoleCode objects
* @method ManyManyList Groups() List of Group objects
* @method SilverStripe\ORM\HasManyList<PermissionRoleCode> Codes()
* @method SilverStripe\ORM\ManyManyList<Group> Groups()
Copy link
Member

@GuySartorelli GuySartorelli Dec 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See above comment and perform the same actions here as you will there.

@emteknetnz
Copy link
Member Author

Closed in favor of #11093 (this branch was accidentally pushed to silverstripe account instead of creative-commoners

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants