PHP 8.2.31
Preview: LanguageConstructSpacingStandard.xml Size: 1.35 KB
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Generic/Docs/WhiteSpace/LanguageConstructSpacingStandard.xml

<documentation title="Language Construct Spacing">
    <standard>
    <![CDATA[
    Language constructs that can be used without parentheses, must have a single space between the language construct keyword and its content.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: Single space after language construct.">
        <![CDATA[
echo<em> </em>'Hello, World!';
throw<em> </em>new<em> </em>Exception();
return<em> </em>$newLine;
        ]]>
        </code>
        <code title="Invalid: No space, more than one space or newline after language construct.">
        <![CDATA[
echo<em></em>'Hello, World!';
throw<em>   </em>new<em>   </em>Exception();
return<em></em>
$newLine;
        ]]>
        </code>
    </code_comparison>
    <standard>
    <![CDATA[
    A single space must be used between the "yield" and "from" keywords for a "yield from" expression.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: Single space between yield and from.">
        <![CDATA[
function myGenerator() {
    yield<em> </em>from [1, 2, 3];
}
        ]]>
        </code>
        <code title="Invalid: More than one space or newline between yield and from.">
        <![CDATA[
function myGenerator() {
    yield<em>  </em>from [1, 2, 3];
    yield<em></em>
    from [1, 2, 3];
}
        ]]>
        </code>
    </code_comparison>
</documentation>

Directory Contents

Dirs: 0 × Files: 8

Name Size Perms Modified Actions
596 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
174 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
172 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
625 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
738 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
1.35 KB lrw-r--r-- 2025-11-04 16:30:35
Edit Download
582 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download
922 B lrw-r--r-- 2025-11-04 16:30:35
Edit Download

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