mirror of
https://github.com/jupeter/clean-code-php.git
synced 2025-09-25 13:39:04 +02:00
fix typo
change 'Single Responsibility Pattern' to 'Single Responsibility Principle' in `Prefer final classes` chapter
This commit is contained in:
@@ -1511,13 +1511,14 @@ $car->dump();
|
||||
|
||||
**[⬆ back to top](#table-of-contents)**
|
||||
|
||||
### Prefer final classes
|
||||
### Prefer
|
||||
classes
|
||||
|
||||
The `final` should be used whenever possible:
|
||||
|
||||
1. It prevents uncontrolled inheritance chain.
|
||||
2. It encourages [composition](#prefer-composition-over-inheritance).
|
||||
3. It encourages the [Single Responsibility Pattern](#single-responsibility-principle-srp).
|
||||
3. It encourages the [Single Responsibility Principle](#single-responsibility-principle-srp).
|
||||
4. It encourages developers to use your public methods instead of extending the class to get access on protected ones.
|
||||
5. It allows you to change your code without any break of applications that use your class.
|
||||
|
||||
|
Reference in New Issue
Block a user