PHP Classes

File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml

Recommend this page to a friend!
  Classes of Adeleye Ayodeji   Download Installed Plugin   vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml   Download  
File: vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Download Installed Plugin
Download a WordPress plugin as a ZIP archive
Author: By
Last change:
Date: 2 days ago
Size: 1,306 bytes
 

Contents

Class file image Download
<documentation title="Scope Closing Brace"> <standard> <![CDATA[ Indentation of a closing brace must match the indentation of the line containing the opening brace. ]]> </standard> <code_comparison> <code title="Valid: Closing brace aligned with line containing opening brace."> <![CDATA[ function foo() { <em>}</em> if (!class_exists('Foo')) { class Foo { <em>}</em> <em>}</em> <?php if ($something) { ?> <span>some output</span> <em><?php }</em> ?> ]]> </code> <code title="Invalid: Closing brace misaligned with line containing opening brace."> <![CDATA[ function foo() { <em> }</em> if (!class_exists('Foo')) { class Foo { <em>}</em> <em> }</em> <?php if ($something) { ?> <span>some output</span> <em> <?php }</em> ?> ]]> </code> </code_comparison> <standard> <![CDATA[ Closing brace must be on a line by itself. ]]> </standard> <code_comparison> <code title="Valid: Close brace on its own line."> <![CDATA[ enum Foo { <em>}</em> ]]> </code> <code title="Invalid: Close brace on a line containing other code."> <![CDATA[ enum Foo {<em>}</em> ]]> </code> </code_comparison> </documentation>