REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 3.12 KB
Close
//opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Docs/Arrays/ArrayDeclarationStandard.xml
Text
Base64
<documentation title="Array Declarations"> <standard> <![CDATA[ This standard covers all array declarations, regardless of the number and type of values contained within the array. ]]> </standard> <standard> <![CDATA[ The <em>array</em> keyword must be lowercase. ]]> </standard> <code_comparison> <code title="Valid: Array keyword lowercase."> <![CDATA[ $array = array('val1', 'val2'); ]]> </code> <code title="Invalid: First letter capitalised."> <![CDATA[ $array = Array('val1', 'val2'); ]]> </code> </code_comparison> <standard> <![CDATA[ The first array key must begin on the line after the <em>array</em> keyword. ]]> </standard> <code_comparison> <code title="Valid: First key on second line."> <![CDATA[ $array = array( 'key1' => 'value1', 'key2' => 'value2', ); ]]> </code> <code title="Invalid: First key on same line."> <![CDATA[ $array = array('key1' => 'value1', 'key2' => 'value2', ); ]]> </code> </code_comparison> <standard> <![CDATA[ All array keys must be indented to one space after the start of the <em>array</em> keyword. The closing parenthesis must be aligned with the start of the <em>array</em> keyword. ]]> </standard> <code_comparison> <code title="Valid: Aligned correctly."> <![CDATA[ $array = array( <em> </em>'key1' => 'value1', <em> </em>'key2' => 'value2', ); ]]> </code> <code title="Invalid: Keys and parenthesis aligned incorrectly."> <![CDATA[ $array = array( <em>'</em>key1' => 'value1', <em>'</em>key2' => 'value2', ); ]]> </code> </code_comparison> <standard> <![CDATA[ All double arrow symbols must be aligned to one space after the longest array key. Alignment must be achieved using spaces. ]]> </standard> <code_comparison> <code title="Valid: Keys and values aligned."> <![CDATA[ $array = array( 'keyTen'<em> </em>=> 'ValueTen', 'keyTwenty'<em> </em>=> 'ValueTwenty', ); ]]> </code> <code title="Invalid: Alignment incorrect."> <![CDATA[ $array = array( 'keyTen'<em> </em>=> 'ValueTen', 'keyTwenty'<em> </em>=> 'ValueTwenty', ); ]]> </code> </code_comparison> <standard> <![CDATA[ All array values must be followed by a comma, including the final value. ]]> </standard> <code_comparison> <code title="Valid: Comma after each value."> <![CDATA[ $array = array( 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'<em>,</em> ); ]]> </code> <code title="Invalid: No comma after last value."> <![CDATA[ $array = array( 'key1' => 'value1', 'key2' => 'value2', 'key3' => 'value3'<em> </em> ); ]]> </code> </code_comparison> </documentation>
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 2
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
ArrayBracketSpacingStandard.xml
573 B
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ArrayDeclarationStandard.xml
3.12 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).