1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-06 16:46:30 +02:00

Created Casting (markdown)

LogMANOriginal
2018-11-05 13:32:12 +01:00
parent 0ef95e7bae
commit 0d0798009e

21
Casting.md Normal file

@@ -0,0 +1,21 @@
# Do not add spaces when casting
The casting type should be put into parenthesis without spaces.
<details><summary>Example</summary><div><br>
**Bad**
```PHP
$text = ( string )$number;
```
**Good**
```PHP
$text = (string)$number;
```
</div></details><br>
_Reference_: [`Squiz.WhiteSpace.CastSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php)