Total Complexity | 66 |
Total Lines | 628 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
Complex classes like ComputopFactory often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use ComputopFactory, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
90 | class ComputopFactory extends AbstractFactory |
||
91 | { |
||
92 | /** |
||
93 | * @return \SprykerEco\Yves\Computop\ComputopConfigInterface |
||
94 | */ |
||
95 | public function getComputopConfig(): ComputopConfigInterface |
||
96 | { |
||
97 | return $this->getConfig(); |
||
98 | } |
||
99 | |||
100 | /** |
||
101 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPaymentHandlerInterface |
||
102 | */ |
||
103 | public function createComputopPaymentHandler(): ComputopPaymentHandlerInterface |
||
104 | { |
||
105 | return new ComputopPaymentHandler($this->getConfig()); |
||
106 | } |
||
107 | |||
108 | /** |
||
109 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
110 | */ |
||
111 | public function createCreditCardForm(): SubFormInterface |
||
112 | { |
||
113 | return new CreditCardSubForm(); |
||
114 | } |
||
115 | |||
116 | /** |
||
117 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
118 | */ |
||
119 | public function createPayNowForm(): SubFormInterface |
||
120 | { |
||
121 | return new PayNowSubForm(); |
||
122 | } |
||
123 | |||
124 | /** |
||
125 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
126 | */ |
||
127 | public function createPayPalForm(): SubFormInterface |
||
128 | { |
||
129 | return new PayPalSubForm(); |
||
130 | } |
||
131 | |||
132 | /** |
||
133 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
134 | */ |
||
135 | public function createSofortForm(): SubFormInterface |
||
136 | { |
||
137 | return new SofortSubForm(); |
||
138 | } |
||
139 | |||
140 | /** |
||
141 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
142 | */ |
||
143 | public function createDirectDebitForm(): SubFormInterface |
||
144 | { |
||
145 | return new DirectDebitSubForm(); |
||
146 | } |
||
147 | |||
148 | /** |
||
149 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
150 | */ |
||
151 | public function createPaydirektForm(): SubFormInterface |
||
152 | { |
||
153 | return new PaydirektSubForm(); |
||
154 | } |
||
155 | |||
156 | /** |
||
157 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
158 | */ |
||
159 | public function createIdealForm(): SubFormInterface |
||
160 | { |
||
161 | return new IdealSubForm(); |
||
162 | } |
||
163 | |||
164 | /** |
||
165 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
166 | */ |
||
167 | public function createEasyCreditForm(): SubFormInterface |
||
168 | { |
||
169 | return new EasyCreditSubForm(); |
||
170 | } |
||
171 | |||
172 | /** |
||
173 | * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
||
174 | */ |
||
175 | public function createPayuCeeSingleSubForm(): SubFormInterface |
||
176 | { |
||
177 | return new PayuCeeSingleSubForm(); |
||
178 | } |
||
179 | |||
180 | /** |
||
181 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
182 | */ |
||
183 | public function createCreditCardFormDataProvider(): StepEngineFormDataProviderInterface |
||
184 | { |
||
185 | return new CreditCardFormDataProvider($this->getQuoteClient(), $this->createOrderCreditCardMapper()); |
||
186 | } |
||
187 | |||
188 | /** |
||
189 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
190 | */ |
||
191 | public function createPayNowFormDataProvider(): StepEngineFormDataProviderInterface |
||
192 | { |
||
193 | return new PayNowFormDataProvider($this->getQuoteClient(), $this->createOrderPayNowMapper()); |
||
194 | } |
||
195 | |||
196 | /** |
||
197 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
198 | */ |
||
199 | public function createPayPalFormDataProvider(): StepEngineFormDataProviderInterface |
||
200 | { |
||
201 | return new PayPalFormDataProvider($this->getQuoteClient(), $this->createOrderPayPalMapper()); |
||
202 | } |
||
203 | |||
204 | /** |
||
205 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
206 | */ |
||
207 | public function createPayPalExpressFormDataProvider(): StepEngineFormDataProviderInterface |
||
208 | { |
||
209 | return new PayPalExpressFormDataProvider($this->getQuoteClient(), $this->createPayPalExpressMapper()); |
||
210 | } |
||
211 | |||
212 | /** |
||
213 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
214 | */ |
||
215 | public function createSofortFormDataProvider(): StepEngineFormDataProviderInterface |
||
216 | { |
||
217 | return new SofortFormDataProvider($this->getQuoteClient(), $this->createOrderSofortMapper()); |
||
218 | } |
||
219 | |||
220 | /** |
||
221 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
222 | */ |
||
223 | public function createDirectDebitFormDataProvider(): StepEngineFormDataProviderInterface |
||
224 | { |
||
225 | return new DirectDebitFormDataProvider($this->getQuoteClient(), $this->createOrderDirectDebitMapper()); |
||
226 | } |
||
227 | |||
228 | /** |
||
229 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
230 | */ |
||
231 | public function createPaydirektFormDataProvider(): StepEngineFormDataProviderInterface |
||
232 | { |
||
233 | return new PaydirektFormDataProvider($this->getQuoteClient(), $this->createOrderPaydirektMapper()); |
||
234 | } |
||
235 | |||
236 | /** |
||
237 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
238 | */ |
||
239 | public function createIdealFormDataProvider(): StepEngineFormDataProviderInterface |
||
240 | { |
||
241 | return new IdealFormDataProvider($this->getQuoteClient(), $this->createOrderIdealMapper()); |
||
242 | } |
||
243 | |||
244 | /** |
||
245 | * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface |
||
246 | */ |
||
247 | public function createEasyCreditFormDataProvider(): StepEngineFormDataProviderInterface |
||
248 | { |
||
249 | return new EasyCreditFormDataProvider($this->getQuoteClient(), $this->createOrderEasyCreditMapper()); |
||
250 | } |
||
251 | |||
252 | /** |
||
253 | * @return \SprykerEco\Yves\Computop\Form\DataProvider\PayuCeeSingleFormDataProvider |
||
254 | */ |
||
255 | public function createPayuCeeSingleFormDataProvider(): PayuCeeSingleFormDataProvider |
||
256 | { |
||
257 | return new PayuCeeSingleFormDataProvider($this->getQuoteClient(), $this->createOrderPayuCeeSingleMapper()); |
||
258 | } |
||
259 | |||
260 | /** |
||
261 | * @return \SprykerEco\Service\ComputopApi\ComputopApiServiceInterface |
||
262 | */ |
||
263 | public function getComputopApiService(): ComputopApiServiceInterface |
||
264 | { |
||
265 | return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_COMPUTOP_API); |
||
266 | } |
||
267 | |||
268 | /** |
||
269 | * @return \Symfony\Component\HttpKernel\HttpKernelInterface |
||
270 | */ |
||
271 | public function getApplication(): HttpKernelInterface |
||
272 | { |
||
273 | return $this->getProvidedDependency(ComputopDependencyProvider::PLUGIN_APPLICATION); |
||
274 | } |
||
275 | |||
276 | /** |
||
277 | * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToQuoteClientInterface |
||
278 | */ |
||
279 | public function getQuoteClient(): ComputopToQuoteClientInterface |
||
280 | { |
||
281 | return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_QUOTE); |
||
282 | } |
||
283 | |||
284 | /** |
||
285 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
286 | */ |
||
287 | public function createCreditCardPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
288 | { |
||
289 | return new ComputopCreditCardPaymentHandler($this->createInitCreditCardConverter(), $this->getComputopClient()); |
||
290 | } |
||
291 | |||
292 | /** |
||
293 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
294 | */ |
||
295 | public function createPayNowPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
296 | { |
||
297 | return new ComputopPayNowPaymentHandler($this->createInitPayNowConverter(), $this->getComputopClient()); |
||
298 | } |
||
299 | |||
300 | /** |
||
301 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
302 | */ |
||
303 | public function createPayPalPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
304 | { |
||
305 | return new ComputopPayPalPaymentHandler($this->createInitPayPalConverter(), $this->getComputopClient()); |
||
306 | } |
||
307 | |||
308 | /** |
||
309 | * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressInitAggregatorInterface |
||
310 | */ |
||
311 | public function createComputopPayPalExpressInitAggregator(): ComputopPayPalExpressInitAggregatorInterface |
||
312 | { |
||
313 | return new ComputopPayPalExpressInitAggregator( |
||
314 | $this->createComputopPaymentHandler(), |
||
315 | $this->createInitPayPalExpressConverter(), |
||
316 | $this->getQuoteClient(), |
||
317 | $this->createPayPalExpressToQuoteMapper(), |
||
318 | $this->getPayPalExpressInitQuoteExpanderPlugins() |
||
319 | ); |
||
320 | } |
||
321 | |||
322 | /** |
||
323 | * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressPrepareAggregatorInterface |
||
324 | */ |
||
325 | public function createComputopPayPalExpressPrepareAggregator(): ComputopPayPalExpressPrepareAggregatorInterface |
||
326 | { |
||
327 | return new ComputopPayPalExpressPrepareAggregator( |
||
328 | $this->getQuoteClient(), |
||
329 | $this->createPayPalExpressFormDataProvider(), |
||
330 | $this->getComputopApiClient() |
||
331 | ); |
||
332 | } |
||
333 | |||
334 | /** |
||
335 | * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressCompleteAggregatorInterface |
||
336 | */ |
||
337 | public function createComputopPayPalExpressCompleteAggregator(): ComputopPayPalExpressCompleteAggregatorInterface |
||
338 | { |
||
339 | return new ComputopPayPalExpressCompleteAggregator( |
||
340 | $this->getComputopApiClient(), |
||
341 | $this->getComputopClient() |
||
342 | ); |
||
343 | } |
||
344 | |||
345 | /** |
||
346 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
347 | */ |
||
348 | public function createDirectDebitPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
349 | { |
||
350 | return new ComputopDirectDebitPaymentHandler($this->createInitDirectDebitConverter(), $this->getComputopClient()); |
||
351 | } |
||
352 | |||
353 | /** |
||
354 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
355 | */ |
||
356 | public function createEasyCreditPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
362 | ); |
||
363 | } |
||
364 | |||
365 | /** |
||
366 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
367 | */ |
||
368 | public function createPayuCeeSinglePaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
369 | { |
||
370 | return new ComputopPayuCeeSinglePaymentHandler( |
||
371 | $this->createInitPayuCeeSingleConverter(), |
||
372 | $this->getComputopClient() |
||
373 | ); |
||
374 | } |
||
375 | |||
376 | /** |
||
377 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
378 | */ |
||
379 | public function createPaydirektPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
380 | { |
||
381 | return new ComputopPaydirektPaymentHandler($this->createInitPaydirektConverter(), $this->getComputopClient()); |
||
382 | } |
||
383 | |||
384 | /** |
||
385 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
386 | */ |
||
387 | public function createSofortPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
388 | { |
||
389 | return new ComputopSofortPaymentHandler($this->createInitSofortConverter(), $this->getComputopClient()); |
||
390 | } |
||
391 | |||
392 | /** |
||
393 | * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface |
||
394 | */ |
||
395 | public function createIdealPaymentHandler(): ComputopPrePostPaymentHandlerInterface |
||
396 | { |
||
397 | return new ComputopIdealPaymentHandler($this->createInitIdealConverter(), $this->getComputopClient()); |
||
398 | } |
||
399 | |||
400 | /** |
||
401 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
402 | */ |
||
403 | public function createInitCreditCardConverter(): ConverterInterface |
||
406 | } |
||
407 | |||
408 | /** |
||
409 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
410 | */ |
||
411 | public function createInitPayNowConverter(): ConverterInterface |
||
412 | { |
||
413 | return new InitPayNowConverter($this->getComputopApiService(), $this->getConfig()); |
||
414 | } |
||
415 | |||
416 | /** |
||
417 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
418 | */ |
||
419 | public function createInitPayPalConverter(): ConverterInterface |
||
420 | { |
||
421 | return new InitPayPalConverter($this->getComputopApiService(), $this->getConfig()); |
||
422 | } |
||
423 | |||
424 | /** |
||
425 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
426 | */ |
||
427 | public function createInitPayPalExpressConverter(): ConverterInterface |
||
428 | { |
||
429 | return new InitPayPalExpressConverter($this->getComputopApiService(), $this->getConfig()); |
||
430 | } |
||
431 | |||
432 | /** |
||
433 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
434 | */ |
||
435 | public function createInitDirectDebitConverter(): ConverterInterface |
||
436 | { |
||
437 | return new InitDirectDebitConverter($this->getComputopApiService(), $this->getConfig()); |
||
438 | } |
||
439 | |||
440 | /** |
||
441 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
442 | */ |
||
443 | public function createInitEasyCreditConverter(): ConverterInterface |
||
444 | { |
||
445 | return new InitEasyCreditConverter($this->getComputopApiService(), $this->getConfig()); |
||
446 | } |
||
447 | |||
448 | /** |
||
449 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
450 | */ |
||
451 | public function createInitPayuCeeSingleConverter(): ConverterInterface |
||
452 | { |
||
453 | return new InitPayuCeeSingleConverter($this->getComputopApiService(), $this->getConfig()); |
||
454 | } |
||
455 | |||
456 | /** |
||
457 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
458 | */ |
||
459 | public function createInitPaydirektConverter(): ConverterInterface |
||
460 | { |
||
461 | return new InitPaydirektConverter($this->getComputopApiService(), $this->getConfig()); |
||
462 | } |
||
463 | |||
464 | /** |
||
465 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
466 | */ |
||
467 | public function createInitSofortConverter(): ConverterInterface |
||
468 | { |
||
469 | return new InitSofortConverter($this->getComputopApiService(), $this->getConfig()); |
||
470 | } |
||
471 | |||
472 | /** |
||
473 | * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface |
||
474 | */ |
||
475 | public function createInitIdealConverter(): ConverterInterface |
||
476 | { |
||
477 | return new InitIdealConverter($this->getComputopApiService(), $this->getConfig()); |
||
478 | } |
||
479 | |||
480 | /** |
||
481 | * @return \SprykerEco\Client\Computop\ComputopClientInterface |
||
482 | */ |
||
483 | public function getComputopClient(): ComputopClientInterface |
||
484 | { |
||
485 | return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COMPUTOP); |
||
486 | } |
||
487 | |||
488 | /** |
||
489 | * @return \SprykerEco\Yves\Computop\Dependency\ComputopToStoreInterface |
||
490 | */ |
||
491 | public function getStore(): ComputopToStoreInterface |
||
492 | { |
||
493 | return $this->getProvidedDependency(ComputopDependencyProvider::STORE); |
||
494 | } |
||
495 | |||
496 | /** |
||
497 | * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCalculationClientInterface |
||
498 | */ |
||
499 | public function getCalculationClient(): ComputopToCalculationClientInterface |
||
500 | { |
||
501 | return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_CALCULATION); |
||
502 | } |
||
503 | |||
504 | /** |
||
505 | * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToComputopApiClientInterface |
||
506 | */ |
||
507 | public function getComputopApiClient(): ComputopToComputopApiClientInterface |
||
508 | { |
||
509 | return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COMPUTOP_API); |
||
510 | } |
||
511 | |||
512 | /** |
||
513 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
514 | */ |
||
515 | public function createOrderCreditCardMapper(): MapperInterface |
||
516 | { |
||
517 | return new CreditCardMapper( |
||
518 | $this->getComputopApiService(), |
||
519 | $this->getRouter(), |
||
520 | $this->getStore(), |
||
521 | $this->getConfig(), |
||
522 | $this->getRequestStack()->getCurrentRequest(), |
||
|
|||
523 | $this->getUtilEncodingService(), |
||
524 | $this->getCountryClient() |
||
525 | ); |
||
526 | } |
||
527 | |||
528 | /** |
||
529 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
530 | */ |
||
531 | public function createOrderPayNowMapper(): MapperInterface |
||
532 | { |
||
533 | return new PayNowMapper( |
||
534 | $this->getComputopApiService(), |
||
535 | $this->getRouter(), |
||
536 | $this->getStore(), |
||
537 | $this->getConfig(), |
||
538 | $this->getRequestStack()->getCurrentRequest(), |
||
539 | $this->getUtilEncodingService(), |
||
540 | $this->getCountryClient() |
||
541 | ); |
||
542 | } |
||
543 | |||
544 | /** |
||
545 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
546 | */ |
||
547 | public function createOrderPayPalMapper(): MapperInterface |
||
548 | { |
||
549 | return new PayPalMapper( |
||
550 | $this->getComputopApiService(), |
||
551 | $this->getRouter(), |
||
552 | $this->getStore(), |
||
553 | $this->getConfig(), |
||
554 | $this->getRequestStack()->getCurrentRequest(), |
||
555 | $this->getUtilEncodingService(), |
||
556 | $this->getCountryClient() |
||
557 | ); |
||
558 | } |
||
559 | |||
560 | /** |
||
561 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
562 | */ |
||
563 | public function createPayPalExpressMapper(): MapperInterface |
||
564 | { |
||
565 | return new PayPalExpressMapper( |
||
566 | $this->getComputopApiService(), |
||
567 | $this->getRouter(), |
||
568 | $this->getStore(), |
||
569 | $this->getConfig(), |
||
570 | $this->getRequestStack()->getCurrentRequest(), |
||
571 | $this->getUtilEncodingService(), |
||
572 | $this->getCountryClient() |
||
573 | ); |
||
574 | } |
||
575 | |||
576 | /** |
||
577 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
578 | */ |
||
579 | public function createOrderDirectDebitMapper(): MapperInterface |
||
580 | { |
||
581 | return new DirectDebitMapper( |
||
582 | $this->getComputopApiService(), |
||
583 | $this->getRouter(), |
||
584 | $this->getStore(), |
||
585 | $this->getConfig(), |
||
586 | $this->getRequestStack()->getCurrentRequest(), |
||
587 | $this->getUtilEncodingService(), |
||
588 | $this->getCountryClient() |
||
589 | ); |
||
590 | } |
||
591 | |||
592 | /** |
||
593 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
594 | */ |
||
595 | public function createOrderSofortMapper(): MapperInterface |
||
596 | { |
||
597 | return new SofortMapper( |
||
598 | $this->getComputopApiService(), |
||
599 | $this->getRouter(), |
||
600 | $this->getStore(), |
||
601 | $this->getConfig(), |
||
602 | $this->getRequestStack()->getCurrentRequest(), |
||
603 | $this->getUtilEncodingService(), |
||
604 | $this->getCountryClient() |
||
605 | ); |
||
606 | } |
||
607 | |||
608 | /** |
||
609 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
610 | */ |
||
611 | public function createOrderPaydirektMapper(): MapperInterface |
||
612 | { |
||
613 | return new PaydirektMapper( |
||
614 | $this->getComputopApiService(), |
||
615 | $this->getRouter(), |
||
616 | $this->getStore(), |
||
617 | $this->getConfig(), |
||
618 | $this->getRequestStack()->getCurrentRequest(), |
||
619 | $this->getUtilEncodingService(), |
||
620 | $this->getCountryClient() |
||
621 | ); |
||
622 | } |
||
623 | |||
624 | /** |
||
625 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
626 | */ |
||
627 | public function createOrderIdealMapper(): MapperInterface |
||
628 | { |
||
629 | return new IdealMapper( |
||
630 | $this->getComputopApiService(), |
||
631 | $this->getRouter(), |
||
632 | $this->getStore(), |
||
633 | $this->getConfig(), |
||
634 | $this->getRequestStack()->getCurrentRequest(), |
||
635 | $this->getUtilEncodingService(), |
||
636 | $this->getCountryClient() |
||
637 | ); |
||
638 | } |
||
639 | |||
640 | /** |
||
641 | * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface |
||
642 | */ |
||
643 | public function createOrderEasyCreditMapper(): MapperInterface |
||
653 | ); |
||
654 | } |
||
655 | |||
656 | /** |
||
657 | * @return \SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayuCeeSingleMapper |
||
658 | */ |
||
659 | public function createOrderPayuCeeSingleMapper(): MapperInterface |
||
660 | { |
||
661 | return new PayuCeeSingleMapper( |
||
662 | $this->getComputopApiService(), |
||
663 | $this->getRouter(), |
||
664 | $this->getStore(), |
||
665 | $this->getConfig(), |
||
666 | $this->getRequestStack()->getCurrentRequest(), |
||
667 | $this->getUtilEncodingService(), |
||
668 | $this->getCountryClient() |
||
669 | ); |
||
670 | } |
||
671 | |||
672 | /** |
||
673 | * @return \Spryker\Yves\Router\Router\RouterInterface |
||
674 | */ |
||
675 | public function getRouter(): RouterInterface |
||
676 | { |
||
677 | return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_ROUTER); |
||
678 | } |
||
679 | |||
680 | /** |
||
681 | * @return \Symfony\Component\HttpFoundation\RequestStack |
||
682 | */ |
||
683 | public function getRequestStack(): RequestStack |
||
686 | } |
||
687 | |||
688 | /** |
||
689 | * @return \SprykerEco\Yves\Computop\Dependency\Service\ComputopToUtilEncodingServiceInterface |
||
690 | */ |
||
691 | public function getUtilEncodingService(): ComputopToUtilEncodingServiceInterface |
||
692 | { |
||
693 | return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_UTIL_ENCODING); |
||
694 | } |
||
695 | |||
696 | /** |
||
697 | * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCountryClientInterface |
||
698 | */ |
||
699 | public function getCountryClient(): ComputopToCountryClientInterface |
||
700 | { |
||
701 | return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COUNTRY); |
||
702 | } |
||
703 | |||
704 | /** |
||
705 | * @return \SprykerEco\Yves\Computop\Mapper\Init\PrePlace\PayPalExpressToQuoteMapperInterface |
||
706 | */ |
||
707 | public function createPayPalExpressToQuoteMapper(): PayPalExpressToQuoteMapperInterface |
||
708 | { |
||
709 | return new PayPalExpressToQuoteMapper(); |
||
710 | } |
||
711 | |||
712 | /** |
||
713 | * @return array<\SprykerEco\Yves\ComputopExtension\Dependency\Plugin\PayPalExpressInitQuoteExpanderPluginInterface> |
||
714 | */ |
||
715 | public function getPayPalExpressInitQuoteExpanderPlugins(): array |
||
718 | } |
||
719 | } |
||
720 |