From 3ec95eaa3085fa2320614e7c8213f349baf2a7e1 Mon Sep 17 00:00:00 2001 From: LogMANOriginal Date: Mon, 5 Nov 2018 13:28:10 +0100 Subject: [PATCH] Updated Functions (markdown) --- Functions.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/Functions.md b/Functions.md index c4952a8..b383c37 100644 --- a/Functions.md +++ b/Functions.md @@ -114,4 +114,26 @@ $result = my_function($param1, $param2);
-_Reference_: [`Generic.Functions.FunctionCallArgumentSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php) \ No newline at end of file +_Reference_: [`Generic.Functions.FunctionCallArgumentSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/Generic/Sniffs/Functions/FunctionCallArgumentSpacingSniff.php) + +# Do not add spaces after opening or before closing bracket + +Parenthesis must tightly enclose parameters. + +
Example

+ +**Bad** + +```PHP +if( $condition ) { ... } +``` + +**Good** + +```PHP +if($condition) { ... } +``` + +

+ +_Reference_: [`PSR2.ControlStructures.ControlStructureSpacing`](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR2/Sniffs/ControlStructures/ControlStructureSpacingSniff.php) \ No newline at end of file