Skip to content

Commit

Permalink
Proccessed feedback from jrfnl
Browse files Browse the repository at this point in the history
  • Loading branch information
oltho authored and oltho committed Sep 27, 2019
1 parent 6aec321 commit aecdaa7
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions WordPress/Docs/Classes/ClassInstantiationStandard.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<documentation title="Class Instantiation">
<standard>
<![CDATA[
Instantiation of an object should be done with parenthesis.
Instantiation of an object should be done with parenthesis.
]]>
</standard>
<code_comparison>
Expand All @@ -18,35 +18,35 @@ $a = new Foobar;
</code_comparison>
<standard>
<![CDATA[
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.">
<code title="Valid: no whitespace between the object name and the parenthesis.">
<![CDATA[
$a = new Foobar();
]]>
</code>
<code title="Invalid: spaces between object name and parenthesis.">
<code title="Invalid: a space between the object name and the parenthesis.">
<![CDATA[
$a = new Foobar<em> </em>();
]]>
</code>
</code_comparison>
<standard>
<![CDATA[
Object instantiation by reference is not supported by PHP anymore.
Assigning the return value of "new" by reference was deprecated in PHP 5.3 and removed in PHP 7.0. New by reference should no longer be used.
]]>
</standard>
<code_comparison>
<code title="Valid: object instantiation without reference.">
<![CDATA[
$a = new Foobar();
$a = <em>new</em> Foobar();
]]>
</code>
<code title="Invalid: object instantiation by reference.">
<![CDATA[
$a = <em>&</em> new Foobar();
$a = <em>& new</em> Foobar();
]]>
</code>
</code_comparison>
Expand Down

0 comments on commit aecdaa7

Please sign in to comment.