Created Whitespace (markdown)

LogMANOriginal 2018-11-05 13:31:05 +01:00
parent 3ec95eaa30
commit 65fe2db5a9

27
Whitespace.md Normal file

@ -0,0 +1,27 @@
# Do not add a whitespace before a semicolon
A semicolon indicates the end of a line of code. Spaces before the semicolon is unnecessary and must be removed.
<details><summary>Example</summary><div><br>
**Bad**
```PHP
echo 'Hello World!' ;
```
**Good**
```PHP
echo 'Hello World!';
```
</div></details><br>
_Reference_: [`Squiz.WhiteSpace.SemicolonSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php)
# Do not add whitespace at start or end of a file or end of a line
Whitespace at the end of lines or at the start or end of a file is invisible to the reader and absolutely unnecessary. Thus it must be removed.
_Reference_: [`Squiz.WhiteSpace.SuperfluousWhitespace`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php)