@@ 129-145 (lines=17) @@ | ||
126 | * |
|
127 | * @return void |
|
128 | */ |
|
129 | private function initInjectionStrategies(TypedCollectionInterface $strategies = null) |
|
130 | { |
|
131 | $strategies = $strategies ?? new TypedCollection( |
|
132 | InjectionStrategyInterface::class, |
|
133 | [ |
|
134 | new SetterStrategy, |
|
135 | new NamedMethodStrategy, |
|
136 | new ReflectionStrategy, |
|
137 | ] |
|
138 | ); |
|
139 | ||
140 | if ($strategies->getType() !== InjectionStrategyInterface::class) { |
|
141 | throw new InvalidArgumentException; |
|
142 | } |
|
143 | ||
144 | $this->injectionStrategies = $strategies; |
|
145 | } |
|
146 | } |
|
147 |
@@ 133-149 (lines=17) @@ | ||
130 | * |
|
131 | * @return void |
|
132 | */ |
|
133 | private function initInjectionStrategies(TypedCollectionInterface $strategies = null) |
|
134 | { |
|
135 | $strategies = $strategies ?? new TypedCollection( |
|
136 | InjectionStrategyInterface::class, |
|
137 | [ |
|
138 | new SetterStrategy, |
|
139 | new NamedMethodStrategy, |
|
140 | new ReflectionStrategy, |
|
141 | ] |
|
142 | ); |
|
143 | ||
144 | if ($strategies->getType() !== InjectionStrategyInterface::class) { |
|
145 | throw new InvalidArgumentException; |
|
146 | } |
|
147 | ||
148 | $this->injectionStrategies = $strategies; |
|
149 | } |
|
150 | } |
|
151 |