@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | $this->object = $object; |
32 | 32 | |
33 | - $this->properties = $properties ?? new Collection([]); |
|
33 | + $this->properties = $properties ? ? new Collection([]); |
|
34 | 34 | $this->initInjectionStrategies($injectionStrategies); |
35 | 35 | } |
36 | 36 | |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | */ |
133 | 133 | private function initInjectionStrategies(TypedCollectionInterface $strategies = null) |
134 | 134 | { |
135 | - $strategies = $strategies ?? new TypedCollection( |
|
135 | + $strategies = $strategies ? ? new TypedCollection( |
|
136 | 136 | InjectionStrategyInterface::class, |
137 | 137 | [ |
138 | 138 | new SetterStrategy, |
@@ -26,9 +26,9 @@ discard block |
||
26 | 26 | InstanciatorInterface $instanciator = null |
27 | 27 | ) { |
28 | 28 | $this->class = $class; |
29 | - $this->properties = $properties ?? new Collection([]); |
|
29 | + $this->properties = $properties ? ? new Collection([]); |
|
30 | 30 | $this->initInjectionStrategies($injectionStrategies); |
31 | - $this->instanciator = $instanciator ?? new ReflectionInstanciator; |
|
31 | + $this->instanciator = $instanciator ? ? new ReflectionInstanciator; |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | //avoid injecting the properties already used in the constructor |
110 | 110 | $properties = $this |
111 | 111 | ->properties |
112 | - ->filter(function ($value, $property) use ($parameters) { |
|
112 | + ->filter(function($value, $property) use ($parameters) { |
|
113 | 113 | return !$parameters->contains($property); |
114 | 114 | }); |
115 | 115 | $refl = new ReflectionObject( |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | private function initInjectionStrategies(TypedCollectionInterface $strategies = null) |
130 | 130 | { |
131 | - $strategies = $strategies ?? new TypedCollection( |
|
131 | + $strategies = $strategies ? ? new TypedCollection( |
|
132 | 132 | InjectionStrategyInterface::class, |
133 | 133 | [ |
134 | 134 | new SetterStrategy, |