Skip to content

Commit 8fe2efd

Browse files
bkoelmanmapfel
authored andcommitted
Added recommendation to make types sealed (dennisdoomen#71)
1 parent 3b79b8f commit 8fe2efd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Src/Cheatsheet/Cheatsheet.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ NOTE: Requires Markdown Extra. See http://michelf.ca/projects/php-markdown/extra
6565
**Maintainability**
6666

6767
* Methods should not exceed 7 statements (AV1500)
68-
* Make all members `private` and types `internal` by default (AV1501)
68+
* Make all members `private` and types `internal sealed` by default (AV1501)
6969
* Avoid conditions with double negatives (AV1502)
7070
* Don’t use "magic numbers" (AV1515)
7171
* Only use `var` when the type is very obvious (AV1520)

Src/Guidelines/1500_MaintainabilityGuidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ NOTE: Requires Markdown Extra. See http://michelf.ca/projects/php-markdown/extra
77
### <a name="av1500"></a> Methods should not exceed 7 statements (AV1500) ![](images/1.png)
88
A method that requires more than 7 statements is simply doing too much or has too many responsibilities. It also requires the human mind to analyze the exact statements to understand what the code is doing. Break it down into multiple small and focused methods with self-explaining names, but make sure the high-level algorithm is still clear.
99

10-
### <a name="av1501"></a> Make all members private and types internal by default (AV1501) ![](images/1.png)
10+
### <a name="av1501"></a> Make all members private and types internal sealed by default (AV1501) ![](images/1.png)
1111
To make a more conscious decision on which members to make available to other classes, first restrict the scope as much as possible. Then carefully decide what to expose as a public member or type.
1212

1313
### <a name="av1502"></a> Avoid conditions with double negatives (AV1502) ![](images/2.png)

0 commit comments

Comments
 (0)