-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into whitespace-incomp…
…atibility
- Loading branch information
Showing
17 changed files
with
416 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<documentation title="Closing Tag"> | ||
<standard> | ||
<![CDATA[ | ||
Checks that the file does not end with a closing tag. | ||
]]> | ||
</standard> | ||
<code_comparison> | ||
<code title="Valid: Closing tag not used."> | ||
<![CDATA[ | ||
<?php | ||
echo 'Foo'; | ||
<em></em> | ||
]]> | ||
</code> | ||
<code title="Invalid: Closing tag used."> | ||
<![CDATA[ | ||
<?php | ||
echo 'Foo'; | ||
<em>?></em> | ||
]]> | ||
</code> | ||
</code_comparison> | ||
</documentation> |
107 changes: 107 additions & 0 deletions
107
src/Standards/PSR2/Docs/Methods/FunctionCallSignatureStandard.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
<documentation title="Function Call Signature"> | ||
<standard> | ||
<![CDATA[ | ||
Checks that the function call format is correct. | ||
]]> | ||
</standard> | ||
<code_comparison> | ||
<code title="Valid: Correct spacing is used around parentheses."> | ||
<![CDATA[ | ||
foo<em></em>(<em></em>$bar, $baz<em></em>); | ||
]]> | ||
</code> | ||
<code title="Invalid: Incorrect spacing used, too much space around the parentheses."> | ||
<![CDATA[ | ||
foo<em> </em>(<em> </em>$bar, $baz<em> </em>); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
<code_comparison> | ||
<code title="Valid: Correct number of spaces used for indent in a multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
<em> </em>$bar, | ||
<em> </em>$baz | ||
); | ||
]]> | ||
</code> | ||
<code title="Invalid: Incorrect number of spaces used for indent in a multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
<em> </em>$bar, | ||
<em> </em>$baz | ||
); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
<code_comparison> | ||
<code title="Valid: Closing parenthesis for a multi-line function call is on a new line after the last parameter."> | ||
<![CDATA[ | ||
foo( | ||
$bar, | ||
$baz | ||
<em>)</em>; | ||
]]> | ||
</code> | ||
<code title="Invalid: Closing parenthesis for a multi-line function call is not on a new line after the last parameter."> | ||
<![CDATA[ | ||
foo( | ||
$bar, | ||
$baz<em>)</em>; | ||
]]> | ||
</code> | ||
</code_comparison> | ||
<code_comparison> | ||
<code title="Valid: The first argument of a multi-line function call is on a new line."> | ||
<![CDATA[ | ||
foo( | ||
<em>$bar</em>, | ||
$baz | ||
); | ||
]]> | ||
</code> | ||
<code title="Invalid: The first argument of a multi-line function call is not on a new line."> | ||
<![CDATA[ | ||
foo(<em>$bar</em>, | ||
$baz | ||
); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
<code_comparison> | ||
<code title="Valid: Only one argument per line in a multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
$bar, | ||
<em>$baz</em> | ||
); | ||
]]> | ||
</code> | ||
<code title="Invalid: Two or more arguments per line in a multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
$bar, <em>$baz</em> | ||
); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
<code_comparison> | ||
<code title="Valid: No blank lines in a multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
$bar, | ||
$baz | ||
); | ||
]]> | ||
</code> | ||
<code title="Invalid: Blank line in multi-line function call."> | ||
<![CDATA[ | ||
foo( | ||
$bar, | ||
<em></em> | ||
$baz | ||
); | ||
]]> | ||
</code> | ||
</code_comparison> | ||
</documentation> |
26 changes: 26 additions & 0 deletions
26
src/Standards/PSR2/Docs/Methods/FunctionClosingBraceStandard.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<documentation title="Function Closing Brace"> | ||
<standard> | ||
<![CDATA[ | ||
Checks that the closing brace of a function goes directly after the body. | ||
]]> | ||
</standard> | ||
<code_comparison> | ||
<code title="Valid: Closing brace directly follows the function body."> | ||
<![CDATA[ | ||
function foo() | ||
{ | ||
echo 'foo'; | ||
<em>}</em> | ||
]]> | ||
</code> | ||
<code title="Invalid: Blank line between the function body and the closing brace."> | ||
<![CDATA[ | ||
function foo() | ||
{ | ||
echo 'foo'; | ||
<em></em> | ||
<em>}</em> | ||
]]> | ||
</code> | ||
</code_comparison> | ||
</documentation> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.