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

Fix several comments syntaxes #3615

Merged
merged 2 commits into from
May 8, 2021
Merged

Conversation

Alkarex
Copy link
Member

@Alkarex Alkarex commented May 7, 2021

Mainly wrong @return types in comments

Mainly wrong `@return` types in comments
@Alkarex Alkarex added this to the 1.18.1 milestone May 7, 2021
* Returns the result as a JSON object.
*
* @return JSON object
* @return array
Copy link
Member

Choose a reason for hiding this comment

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

There's no JSON involved at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, it is just an array

Copy link
Member

@Frenzie Frenzie left a comment

Choose a reason for hiding this comment

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

Thanks!

@Alkarex Alkarex merged commit 607f7e7 into FreshRSS:edge May 8, 2021
@Alkarex Alkarex deleted the minor_doc_types branch May 8, 2021 08:27
@@ -51,7 +51,7 @@ public static function load($filename) {

/**
* Return the list of sharing options.
* @return an array of FreshRSS_Share objects.
* @return array[FreshRSS_Share]
Copy link
Member

Choose a reason for hiding this comment

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

I thought the syntax was FreshRSS_Share[]

Copy link
Member Author

Choose a reason for hiding this comment

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

I think there is more than one syntax, and I am not sure which is most common / best (although I think that array is more usual than []).
Feel free to change.
https://stackoverflow.com/questions/778564/phpdoc-type-hinting-for-array-of-objects/23072048#23072048
https://stackoverflow.com/questions/2713710/comment-associative-array-in-php-documentor/2725073

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.

3 participants