1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-02 14:47:35 +02:00

Created Arrays (markdown)

LogMANOriginal
2019-11-01 18:03:53 +01:00
parent 4dc60e7ff6
commit b6c58710c8

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)