mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 16:46:30 +02:00
Created Casting (markdown)
21
Casting.md
Normal file
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)
|
Reference in New Issue
Block a user