From 0ef95e7bae47882fad1cac23e2ccc9f2bd175519 Mon Sep 17 00:00:00 2001 From: LogMANOriginal Date: Mon, 5 Nov 2018 13:31:49 +0100 Subject: [PATCH] Updated Whitespace (markdown) --- Whitespace.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Whitespace.md b/Whitespace.md index 215bdb4..9065b0a 100644 --- a/Whitespace.md +++ b/Whitespace.md @@ -1,3 +1,30 @@ +# Add a new line at the end of a file + +Each PHP/CSS/HTML file must end with a new line at the end of a file. + +
Example

+ +**Bad** + +```PHP +{ + // code here +} // This is the end of the file +``` + +**Good** + +```PHP +{ + // code here +} +// This is the end of the file +``` + +

+ +_Reference_: [`PSR2.Files.EndFileNewline`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/Files/EndFileNewlineSniff.php) + # 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.