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

Documentation Class Instantiation #1801

Merged
merged 2 commits into from
Sep 28, 2019
Merged

Documentation Class Instantiation #1801

merged 2 commits into from
Sep 28, 2019

Conversation

FORTE-WP
Copy link

Related to #1722

Copy link
Member

@GaryJones GaryJones left a comment

Choose a reason for hiding this comment

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

Seems to cover all the violations in the sniff.

Copy link
Member

@jrfnl jrfnl left a comment

Choose a reason for hiding this comment

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

@FORTE-WP Hi Frank, thank you for this PR! Looking good.

I've left some minor, mostly grammatical, remarks inline.

Other than that, I also noticed there is trailing whitespace after the description in each of the <standard> blocks.

Aside from that, all looks good.

</code_comparison>
<standard>
<![CDATA[
Don't use spaces between object name and open parenthesis when instantiating new object.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Don't use spaces between object name and open parenthesis when instantiating new object.
Don't use spaces between the object name and the open parenthesis when instantiating new object.

]]>
</standard>
<code_comparison>
<code title="Valid: no spaces between object name and parenthesis.">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<code title="Valid: no spaces between object name and parenthesis.">
<code title="Valid: no whitespace between the object name and the parenthesis.">

$a = new Foobar();
]]>
</code>
<code title="Invalid: spaces between object name and parenthesis.">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<code title="Invalid: spaces between object name and parenthesis.">
<code title="Invalid: a space between the object name and the parenthesis.">

WordPress/Docs/Classes/ClassInstantiationStandard.xml Outdated Show resolved Hide resolved
<code_comparison>
<code title="Valid: object instantiation without reference.">
<![CDATA[
$a = new Foobar();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$a = new Foobar();
$a = <em>new</em> Foobar();

</code>
<code title="Invalid: object instantiation by reference.">
<![CDATA[
$a = <em>&</em> new Foobar();
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
$a = <em>&</em> new Foobar();
$a = <em>& new</em> Foobar();

@FORTE-WP
Copy link
Author

I just processed all feedback from jrfnl in a new commit.

@jrfnl
Copy link
Member

jrfnl commented Sep 28, 2019

Thank you @FORTE-WP for making those changes!

@jrfnl jrfnl merged commit 0d2f984 into WordPress:develop Sep 28, 2019
@jrfnl jrfnl added this to the 2.2.0 milestone Sep 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants