diff --git a/Operators.md b/Operators.md new file mode 100644 index 0000000..72919e9 --- /dev/null +++ b/Operators.md @@ -0,0 +1,21 @@ +# Operators must have a space around them + +Operators must be readable and therefore should have spaces around them. + +
Example

+ +**Bad** + +```PHP +$text='Hello '.$name.'!'; +``` + +**Good** + +```PHP +$text = 'Hello ' . $name . '!'; +``` + +

+ +_Reference_: [`Squiz.WhiteSpace.OperatorSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php) \ No newline at end of file