Pārlūkot izejas kodu

Reword statement in standards.md

Kane York 11 gadi atpakaļ
vecāks
revīzija
0a4de6e2fc
1 mainītis faili ar 6 papildinājumiem un 5 dzēšanām
  1. 6 5
      standards.md

+ 6 - 5
standards.md

@@ -58,12 +58,13 @@ finally () {</pre>
                 break;
 
             case 2:</pre>
-* Whenever possible, check for a negative, rather than a positive
- * <pre>if (!something) {
-            // Do things
+* Prefer early returns over method indentation. Example:
+ * <pre>if (!precondition) {
+            // Possibly cleanup
+            return;
         }
 
-        // Do other things</pre>
+        // Continue with task</pre>
 * Java standard class and method naming, with exception to McMMO in a class name
  * <pre>thisIsAMethod()</pre>
  * <pre>ThisIsAClass</pre>
@@ -92,4 +93,4 @@ finally () {</pre>
  * private
  * static private
  * abstract private
-* No one-line if statements, they should all have brackets
+* No one-line if statements, they should all have brackets