Skip to content

Commit fbea670

Browse files
committed
refactor(service_container): refactoring on wording
1 parent 51654fb commit fbea670

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

service_container/injection_types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ then extending it and overriding the constructor becomes problematic.
103103
Immutable-setter Injection
104104
--------------------------
105105

106-
Another possible injection in to use a method which return ``static``,
107-
this approach allow you to make a service immutable::
106+
Another possible injection in to use a method which return a separate instance
107+
by cloning the original service, this approach allow you to make a service immutable::
108108

109109
// ...
110110

@@ -179,7 +179,7 @@ which allow the container to return the newly created service:
179179
for the container to be capable of registering the method.
180180

181181
This approach is useful if you need to configure your service according to your needs,
182-
so, what are the advantages?
182+
so, here's the advantages of immutable-setters:
183183

184184
* Immutable setters works with optional dependencies, this way, if you don't need
185185
a dependency, the setter don't need to be called.

0 commit comments

Comments
 (0)