Skip to content

Conversation

umpirsky
Copy link
Contributor

@umpirsky umpirsky commented May 3, 2014

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #10145
License MIT

Copy link
Contributor

Choose a reason for hiding this comment

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

I think in this case Section class should be extracted into the separate file. Also @internal phpDoc should be removed from this class annotation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree. Will do.

@umpirsky
Copy link
Contributor Author

umpirsky commented May 9, 2014

Done.

@umpirsky
Copy link
Contributor Author

Any reason not to merge this?

@stof
Copy link
Member

stof commented May 23, 2014

@umpirsky yes. 2.5 reached its feature freeze 1.5 month ago so no new features are merged in it anymore. and merging 2.6 PRs has not started yet

@umpirsky
Copy link
Contributor Author

@stof So basically this PR just waits for 2.6?

@fabpot
Copy link
Member

fabpot commented Jun 6, 2014

Thank you @umpirsky.

@fabpot fabpot closed this in 12d44bc Jun 6, 2014
@umpirsky umpirsky deleted the fix/issue-10145 branch June 6, 2014 07:08
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing phpDoc here, at least the return type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is phpdoc on the class attribute so return type can be figured out by any IDE if that is the point.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I was just wondering if it is consistent with the actual code base?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is no general rule. I am not big fan of phpdocs, unless you have something really useful to say in them. 😄

Copy link
Member

Choose a reason for hiding this comment

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

but here, you have something to say: @return Section[] to document the return type

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isn't it obvious?

Copy link
Member

Choose a reason for hiding this comment

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

no it is not. Your IDE cannot guess that the return value is an array of Section objects when providing completion (well, some IDE could because we have phpdoc on the private property here, but we generally prefer documenting public stuff). The API doc builder cannot guess it either.
And someone not reading the full code may not guess it either.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in #11067.

fabpot added a commit that referenced this pull request Jun 11, 2014
…) (umpirsky)

This PR was merged into the 2.6-dev branch.

Discussion
----------

[Stopwatch] Added return type to Stopwatch::getSections()

#10851 (comment)

Commits
-------

ab00361 Added return type to Stopwatch::getSections()
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.

5 participants