mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-02 14:47:35 +02:00
Created Arrays (markdown)
21
Arrays.md
Normal file
21
Arrays.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Always use the long array syntax
|
||||
|
||||
Arrays should be initialized using the long array syntax.
|
||||
|
||||
<details><summary>Example</summary><div><br>
|
||||
|
||||
**Bad**
|
||||
|
||||
```PHP
|
||||
$data = [ 'hello' => 'world' ];
|
||||
```
|
||||
|
||||
**Good**
|
||||
|
||||
```PHP
|
||||
$data = array('hello' => 'world');
|
||||
```
|
||||
|
||||
</div></details><br>
|
||||
|
||||
_Reference_: [`Generic.Arrays.DisallowShortArraySyntax`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Arrays/DisallowShortArraySyntaxSniff.php)
|
Reference in New Issue
Block a user