PHP 8.2.31
Preview: ScopeClosingBraceStandard.xml Size: 1.28 KB
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/WhiteSpace/ScopeClosingBraceStandard.xml

<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>

Directory Contents

Dirs: 0 × Files: 10

Name Size Perms Modified Actions
491 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.58 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
561 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
578 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.00 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
529 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.28 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
592 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
462 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
2.29 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).