@@ -138,17 +138,11 @@ protected function getBar5Service()
138
138
*/
139
139
protected function getConnectionService ()
140
140
{
141
- $ a = ($ this ->services ['dispatcher ' ] ?? $ this ->getDispatcherService ());
142
-
143
- if (isset ($ this ->services ['connection ' ])) {
144
- return $ this ->services ['connection ' ];
145
- }
146
-
147
- $ b = new \stdClass ();
141
+ $ a = new \stdClass ();
148
142
149
- $ this ->services ['connection ' ] = $ instance = new \stdClass ($ a , $ b );
143
+ $ this ->services ['connection ' ] = $ instance = new \stdClass (( $ this -> services [ ' dispatcher ' ] ?? $ this -> getDispatcherService ()) , $ a );
150
144
151
- $ b ->logger = ($ this ->services ['logger ' ] ?? $ this ->getLoggerService ());
145
+ $ a ->logger = ($ this ->services ['logger ' ] ?? $ this ->getLoggerService ());
152
146
153
147
return $ instance ;
154
148
}
@@ -160,21 +154,15 @@ protected function getConnectionService()
160
154
*/
161
155
protected function getConnection2Service ()
162
156
{
163
- $ a = ($ this ->services ['dispatcher2 ' ] ?? $ this ->getDispatcher2Service ());
164
-
165
- if (isset ($ this ->services ['connection2 ' ])) {
166
- return $ this ->services ['connection2 ' ];
167
- }
168
-
169
- $ b = new \stdClass ();
157
+ $ a = new \stdClass ();
170
158
171
- $ this ->services ['connection2 ' ] = $ instance = new \stdClass ($ a , $ b );
159
+ $ this ->services ['connection2 ' ] = $ instance = new \stdClass (( $ this -> services [ ' dispatcher2 ' ] ?? $ this -> getDispatcher2Service ()) , $ a );
172
160
173
- $ c = new \stdClass ($ instance );
161
+ $ b = new \stdClass ($ instance );
174
162
175
- $ c ->handler2 = new \stdClass (($ this ->services ['manager2 ' ] ?? $ this ->getManager2Service ()));
163
+ $ b ->handler2 = new \stdClass (($ this ->services ['manager2 ' ] ?? $ this ->getManager2Service ()));
176
164
177
- $ b ->logger2 = $ c ;
165
+ $ a ->logger2 = $ b ;
178
166
179
167
return $ instance ;
180
168
}
@@ -384,12 +372,6 @@ protected function getManager2Service()
384
372
*/
385
373
protected function getSubscriberService ()
386
374
{
387
- $ a = ($ this ->services ['manager ' ] ?? $ this ->getManagerService ());
388
-
389
- if (isset ($ this ->services ['subscriber ' ])) {
390
- return $ this ->services ['subscriber ' ];
391
- }
392
-
393
- return $ this ->services ['subscriber ' ] = new \stdClass ($ a );
375
+ return $ this ->services ['subscriber ' ] = new \stdClass (($ this ->services ['manager ' ] ?? $ this ->getManagerService ()));
394
376
}
395
377
}
0 commit comments