I'm seeing a bit of variety for between people indenting when doc tag comments break over lines. Also, different people are aligning tag values/comments differently; some with alignment, some removing all alignment.

Michael de Raadt
added a comment - 12/Jan/12 3:06 PM Omm nomm nomm. I eat documentation for breakfast.
I'm seeing a bit of variety for between people indenting when doc tag comments break over lines. Also, different people are aligning tag values/comments differently; some with alignment, some removing all alignment.
Some comments:
Lines 1825, 1942, 2012, 2063, 2084, 2141, 2168, 2197, could benefit from more explanation of possible values
Lines 1825, 1942 are inconsistent in its use of mixed
Looks pretty good.

Looking for comment on the following things before this gets integrated/rejected.

@package. phpdoc manual states that @package is only applicable to procedural pages and classes. I don't think we should be setting this on functions, I haven't heard any discussion on this and/or modifying package x to support such a thing. Given we have category now for that sort of hackery however it gets my -1 on adding any @package to functions.

@access. I'm not sure about using `@access public` on either classes or functions. This information is redundant as functions and classes are public by default and are only private/protected because of early coding practises or bad design. Personally I think we shouldn't use @access public. I think we should only use @access protected, and @access private.

I don't like the forced alignment that is going on with @package, @category, etc where you've got an @xxx multiple spaces and then the value. I remember Sam Marshall wrote a great article about the annoyances that sort of alignment causes and given that we don't do a similar thing with other @ declarations like @param I think we shouldn't encourage such alignment (I know there are cases of it but in general we don't align vars like that because of the misalignment caused as code changes). Found the post: http://learn.open.ac.uk/mod/oublog/viewpost.php?post=74901 (gets syndicated everywhere as well of course). I'm up for convincing otherwise on this one, presently my personal preference is as stated, but really I think we should just be clear on what we are doing and try to do it consistently.

@return mixed on get_user_timezone could be improved.

@return for get_timezone_record shouldn't use object, should use stdClass. Remember the object class has been deprecated since 2.0 (git show 4f92410fb5)

Just noting:

The third argument to the get_record call in get_timezone_record is incorrect. true == IGNORE_MULTIPLE and should be changed at some point. Will create an issue for that.

Sam Hemelryk
added a comment - 16/Jan/12 4:02 PM Hi Raj,
Looking for comment on the following things before this gets integrated/rejected.
@package. phpdoc manual states that @package is only applicable to procedural pages and classes. I don't think we should be setting this on functions, I haven't heard any discussion on this and/or modifying package x to support such a thing. Given we have category now for that sort of hackery however it gets my -1 on adding any @package to functions.
@access. I'm not sure about using `@access public` on either classes or functions. This information is redundant as functions and classes are public by default and are only private/protected because of early coding practises or bad design. Personally I think we shouldn't use @access public. I think we should only use @access protected, and @access private.
I don't like the forced alignment that is going on with @package, @category, etc where you've got an @xxx multiple spaces and then the value. I remember Sam Marshall wrote a great article about the annoyances that sort of alignment causes and given that we don't do a similar thing with other @ declarations like @param I think we shouldn't encourage such alignment (I know there are cases of it but in general we don't align vars like that because of the misalignment caused as code changes). Found the post: http://learn.open.ac.uk/mod/oublog/viewpost.php?post=74901 (gets syndicated everywhere as well of course). I'm up for convincing otherwise on this one, presently my personal preference is as stated, but really I think we should just be clear on what we are doing and try to do it consistently.
@return mixed on get_user_timezone could be improved.
@return for get_timezone_record shouldn't use object, should use stdClass. Remember the object class has been deprecated since 2.0 (git show 4f92410fb5)
Just noting:
The third argument to the get_record call in get_timezone_record is incorrect. true == IGNORE_MULTIPLE and should be changed at some point. Will create an issue for that.
Let me know your thoughts.
Cheers
Sam

You are right, but we have agreed upon using @package tag for functions, as functions are scattered in different files for CORE_API, hence for this project we made this as exception to group these using package tag.

I agree with this information is redundant for public, but I don't see any harm in adding this information.

Rajesh Taneja
added a comment - 17/Jan/12 10:32 AM Thanks for the feedback Sam,
You are right, but we have agreed upon using @package tag for functions, as functions are scattered in different files for CORE_API, hence for this project we made this as exception to group these using package tag.
I agree with this information is redundant for public, but I don't see any harm in adding this information.
Not sure of this, will check with you before changing/reverting
will update this
Will update this

@package is used in functions where function can't be grouped under @package of file/class. Example is moodlelib.php having preference_api, time api etc. functions which can't be grouped under single package.

@acess public is no harm but is a redundant information and should not be used. Saying so, @acess private and @access protected is acceptable.

Forced alignment of tags should be consistent in docblock. It's up-to the developer to go either way (aligned or single space), but it should be consistent for the whole docblock.

Rajesh Taneja
added a comment - 17/Jan/12 11:47 AM Thanks for discussing this Sam, Summarizing it below:
@package is used in functions where function can't be grouped under @package of file/class. Example is moodlelib.php having preference_api, time api etc. functions which can't be grouped under single package.
@acess public is no harm but is a redundant information and should not be used. Saying so, @acess private and @access protected is acceptable.
Forced alignment of tags should be consistent in docblock. It's up-to the developer to go either way (aligned or single space), but it should be consistent for the whole docblock.

Eloy Lafuente (stronk7)
added a comment - 18/Jan/12 8:29 PM Moving all the phpdocs-related issues out from current integration, will be examined next week.
Note that all these issues are going to be applied exclusively to master, that has been summarily decided by the integration team after hea(t)ring everybody.
Ciao

The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

Eloy Lafuente (stronk7)
added a comment - 19/Jan/12 10:34 PM The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.
TIA and ciao

Eloy Lafuente (stronk7)
added a comment - 26/Jan/12 4:46 PM Passing, just re-reviewed that:
phpdocs look correct.
all the changes are phpdocs.
it didn't break any check in the CI server.
So that should be enough. Ciao

Eloy Lafuente (stronk7)
added a comment - 27/Jan/12 11:06 AM Your nice code represents only 1/46 of the issues that have been sent upstream this week, so thanks, but not many.
Nah, joking, many thanks! Closing this a fixed, ciao