From 8ba3f53d2c84b14fed0901f5e31115658479fe7a Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 10 May 2024 10:48:11 +0100 Subject: [PATCH] Hopefully clarify --- code_style.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code_style.md b/code_style.md index eab031b46d..f18de37e0d 100644 --- a/code_style.md +++ b/code_style.md @@ -226,9 +226,10 @@ Unless otherwise specified, the following applies to all code: ``` 37. Avoid functions whose behaviour / return type varies with different parameter types. - Multiple return types are fine when appropriate (eg. SDKConfig.get() with a string param which - returns the type according to the param given) but SDKConfig.get() with no args returning the - whole config object is not: this could just be a separate function. + Multiple return types are fine, but the function's fundamental behaviour should not + change according its arguments: have two separate functions. For example,SDKConfig.get() + with a string param which returns the type according to the param given but SDKConfig.get() + with no args returning the whole config object is not: this could just be a separate function. ## React