Passed
Push — feature/eco-3656/eco-3658-enab... ( ad6bd6...6b0d13 )
by
unknown
18:26 queued 12:32
created

ComputopFactory::getCheckoutClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * MIT License
5
 * Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file.
6
 */
7
8
namespace SprykerEco\Yves\Computop;
9
10
use Spryker\Yves\Kernel\AbstractFactory;
11
use Spryker\Yves\Router\Router\RouterInterface;
12
use Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface;
13
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface;
14
use SprykerEco\Client\Computop\ComputopClientInterface;
15
use SprykerEco\Service\ComputopApi\ComputopApiServiceInterface;
16
use SprykerEco\Yves\Computop\Converter\ConverterInterface;
17
use SprykerEco\Yves\Computop\Converter\InitCreditCardConverter;
18
use SprykerEco\Yves\Computop\Converter\InitDirectDebitConverter;
19
use SprykerEco\Yves\Computop\Converter\InitEasyCreditConverter;
20
use SprykerEco\Yves\Computop\Converter\InitIdealConverter;
21
use SprykerEco\Yves\Computop\Converter\InitPaydirektConverter;
22
use SprykerEco\Yves\Computop\Converter\InitPayNowConverter;
23
use SprykerEco\Yves\Computop\Converter\InitPayPalConverter;
24
use SprykerEco\Yves\Computop\Converter\InitPayPalExpressConverter;
25
use SprykerEco\Yves\Computop\Converter\InitSofortConverter;
26
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToCalculationClientInterface;
27
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToCheckoutClientInterface;
28
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToComputopApiClientInterface;
29
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToCountryClientInterface;
30
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToQuoteClientInterface;
31
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToShipmentClientInterface;
32
use SprykerEco\Yves\Computop\Dependency\ComputopToStoreInterface;
33
use SprykerEco\Yves\Computop\Dependency\Service\ComputopToUtilEncodingServiceInterface;
34
use SprykerEco\Yves\Computop\Form\CreditCardSubForm;
35
use SprykerEco\Yves\Computop\Form\DataProvider\CreditCardFormDataProvider;
36
use SprykerEco\Yves\Computop\Form\DataProvider\DirectDebitFormDataProvider;
37
use SprykerEco\Yves\Computop\Form\DataProvider\EasyCreditFormDataProvider;
38
use SprykerEco\Yves\Computop\Form\DataProvider\IdealFormDataProvider;
39
use SprykerEco\Yves\Computop\Form\DataProvider\PaydirektFormDataProvider;
40
use SprykerEco\Yves\Computop\Form\DataProvider\PayNowFormDataProvider;
41
use SprykerEco\Yves\Computop\Form\DataProvider\PayPalExpressFormDataProvider;
42
use SprykerEco\Yves\Computop\Form\DataProvider\PayPalFormDataProvider;
43
use SprykerEco\Yves\Computop\Form\DataProvider\SofortFormDataProvider;
44
use SprykerEco\Yves\Computop\Form\DirectDebitSubForm;
45
use SprykerEco\Yves\Computop\Form\EasyCreditSubForm;
46
use SprykerEco\Yves\Computop\Form\IdealSubForm;
47
use SprykerEco\Yves\Computop\Form\PaydirektSubForm;
48
use SprykerEco\Yves\Computop\Form\PayNowSubForm;
49
use SprykerEco\Yves\Computop\Form\PayPalSubForm;
50
use SprykerEco\Yves\Computop\Form\SofortSubForm;
51
use SprykerEco\Yves\Computop\Handler\ComputopPaymentHandler;
52
use SprykerEco\Yves\Computop\Handler\ComputopPaymentHandlerInterface;
53
use SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface;
54
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressCompleteHandler;
55
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressCompleteHandlerInterface;
56
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressInitHandler;
57
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressInitHandlerInterface;
58
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressPrepareHandler;
59
use SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressPrepareHandlerInterface;
60
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopCreditCardPaymentHandler;
61
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopDirectDebitPaymentHandler;
62
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopEasyCreditPaymentHandler;
63
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopIdealPaymentHandler;
64
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPaydirektPaymentHandler;
65
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayNowPaymentHandler;
66
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayPalPaymentHandler;
67
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopSofortPaymentHandler;
68
use SprykerEco\Yves\Computop\Mapper\Init\MapperInterface;
69
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\CreditCardMapper;
70
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\DirectDebitMapper;
71
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\EasyCreditMapper;
72
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\IdealMapper;
73
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PaydirektMapper;
74
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayNowMapper;
75
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayPalExpressMapper;
76
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayPalMapper;
77
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\SofortMapper;
78
use SprykerEco\Yves\Computop\Mapper\Init\PrePlace\PayPalExpressToQuoteMapper;
79
use SprykerEco\Yves\Computop\Mapper\Init\PrePlace\PayPalExpressToQuoteMapperInterface;
80
use Symfony\Component\HttpFoundation\RequestStack;
81
use Symfony\Component\HttpKernel\HttpKernelInterface;
82
83
/**
84
 * @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
85
 * @method \SprykerEco\Client\Computop\ComputopClientInterface getClient()
86
 */
87
class ComputopFactory extends AbstractFactory
88
{
89
    /**
90
     * @return \SprykerEco\Yves\Computop\ComputopConfigInterface
91
     */
92
    public function getComputopConfig(): ComputopConfigInterface
93
    {
94
        return $this->getConfig();
95
    }
96
97
    /**
98
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPaymentHandlerInterface
99
     */
100
    public function createComputopPaymentHandler(): ComputopPaymentHandlerInterface
101
    {
102
        return new ComputopPaymentHandler($this->getConfig());
103
    }
104
105
    /**
106
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
107
     */
108
    public function createCreditCardForm(): SubFormInterface
109
    {
110
        return new CreditCardSubForm();
111
    }
112
113
    /**
114
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
115
     */
116
    public function createPayNowForm(): SubFormInterface
117
    {
118
        return new PayNowSubForm();
119
    }
120
121
    /**
122
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
123
     */
124
    public function createPayPalForm(): SubFormInterface
125
    {
126
        return new PayPalSubForm();
127
    }
128
129
    /**
130
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
131
     */
132
    public function createSofortForm(): SubFormInterface
133
    {
134
        return new SofortSubForm();
135
    }
136
137
    /**
138
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
139
     */
140
    public function createDirectDebitForm(): SubFormInterface
141
    {
142
        return new DirectDebitSubForm();
143
    }
144
145
    /**
146
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
147
     */
148
    public function createPaydirektForm(): SubFormInterface
149
    {
150
        return new PaydirektSubForm();
151
    }
152
153
    /**
154
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
155
     */
156
    public function createIdealForm(): SubFormInterface
157
    {
158
        return new IdealSubForm();
159
    }
160
161
    /**
162
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
163
     */
164
    public function createEasyCreditForm(): SubFormInterface
165
    {
166
        return new EasyCreditSubForm();
167
    }
168
169
    /**
170
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
171
     */
172
    public function createCreditCardFormDataProvider(): StepEngineFormDataProviderInterface
173
    {
174
        return new CreditCardFormDataProvider($this->getQuoteClient(), $this->createOrderCreditCardMapper());
175
    }
176
177
    /**
178
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
179
     */
180
    public function createPayNowFormDataProvider(): StepEngineFormDataProviderInterface
181
    {
182
        return new PayNowFormDataProvider($this->getQuoteClient(), $this->createOrderPayNowMapper());
183
    }
184
185
    /**
186
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
187
     */
188
    public function createPayPalFormDataProvider(): StepEngineFormDataProviderInterface
189
    {
190
        return new PayPalFormDataProvider($this->getQuoteClient(), $this->createOrderPayPalMapper());
191
    }
192
193
    /**
194
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
195
     */
196
    public function createPayPalExpressFormDataProvider(): StepEngineFormDataProviderInterface
197
    {
198
        return new PayPalExpressFormDataProvider($this->getQuoteClient(), $this->createPayPalExpressMapper());
199
    }
200
201
    /**
202
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
203
     */
204
    public function createSofortFormDataProvider(): StepEngineFormDataProviderInterface
205
    {
206
        return new SofortFormDataProvider($this->getQuoteClient(), $this->createOrderSofortMapper());
207
    }
208
209
    /**
210
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
211
     */
212
    public function createDirectDebitFormDataProvider(): StepEngineFormDataProviderInterface
213
    {
214
        return new DirectDebitFormDataProvider($this->getQuoteClient(), $this->createOrderDirectDebitMapper());
215
    }
216
217
    /**
218
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
219
     */
220
    public function createPaydirektFormDataProvider(): StepEngineFormDataProviderInterface
221
    {
222
        return new PaydirektFormDataProvider($this->getQuoteClient(), $this->createOrderPaydirektMapper());
223
    }
224
225
    /**
226
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
227
     */
228
    public function createIdealFormDataProvider(): StepEngineFormDataProviderInterface
229
    {
230
        return new IdealFormDataProvider($this->getQuoteClient(), $this->createOrderIdealMapper());
231
    }
232
233
    /**
234
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
235
     */
236
    public function createEasyCreditFormDataProvider(): StepEngineFormDataProviderInterface
237
    {
238
        return new EasyCreditFormDataProvider($this->getQuoteClient(), $this->createOrderEasyCreditMapper());
239
    }
240
241
    /**
242
     * @return \SprykerEco\Service\ComputopApi\ComputopApiServiceInterface
243
     */
244
    public function getComputopApiService(): ComputopApiServiceInterface
245
    {
246
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_COMPUTOP_API);
247
    }
248
249
    /**
250
     * @return \Symfony\Component\HttpKernel\HttpKernelInterface
251
     */
252
    public function getApplication(): HttpKernelInterface
253
    {
254
        return $this->getProvidedDependency(ComputopDependencyProvider::PLUGIN_APPLICATION);
255
    }
256
257
    /**
258
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToQuoteClientInterface
259
     */
260
    public function getQuoteClient(): ComputopToQuoteClientInterface
261
    {
262
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_QUOTE);
263
    }
264
265
    /**
266
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToShipmentClientInterface
267
     */
268
    public function getShipmentClient(): ComputopToShipmentClientInterface
269
    {
270
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_SHIPMENT);
271
    }
272
273
    /**
274
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCheckoutClientInterface
275
     */
276
    public function getCheckoutClient(): ComputopToCheckoutClientInterface
277
    {
278
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_CHECKOUT);
279
    }
280
281
    /**
282
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
283
     */
284
    public function createCreditCardPaymentHandler(): ComputopPrePostPaymentHandlerInterface
285
    {
286
        return new ComputopCreditCardPaymentHandler($this->createInitCreditCardConverter(), $this->getComputopClient());
287
    }
288
289
    /**
290
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
291
     */
292
    public function createPayNowPaymentHandler(): ComputopPrePostPaymentHandlerInterface
293
    {
294
        return new ComputopPayNowPaymentHandler($this->createInitPayNowConverter(), $this->getComputopClient());
295
    }
296
297
    /**
298
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
299
     */
300
    public function createPayPalPaymentHandler(): ComputopPrePostPaymentHandlerInterface
301
    {
302
        return new ComputopPayPalPaymentHandler($this->createInitPayPalConverter(), $this->getComputopClient());
303
    }
304
305
    /**
306
     * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressInitHandlerInterface
307
     */
308
    public function createComputopPayPalExpressInitHandler(): ComputopPayPalExpressInitHandlerInterface
309
    {
310
        return new ComputopPayPalExpressInitHandler(
311
            $this->createComputopPaymentHandler(),
312
            $this->createInitPayPalExpressConverter(),
313
            $this->getQuoteClient(),
314
            $this->getComputopClient(),
315
            $this->getShipmentClient(),
316
            $this->createPayPalExpressToQuoteMapper()
317
        );
318
    }
319
320
    /**
321
     * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressPrepareHandlerInterface
322
     */
323
    public function createComputopPayPalExpressPrepareHandler(): ComputopPayPalExpressPrepareHandlerInterface
324
    {
325
        return new ComputopPayPalExpressPrepareHandler(
326
            $this->getQuoteClient(),
327
            $this->createPayPalExpressFormDataProvider(),
328
            $this->getComputopApiClient(),
329
            $this->getComputopApiService(),
330
            $this->getComputopConfig()
331
        );
332
    }
333
334
    /**
335
     * @return \SprykerEco\Yves\Computop\Handler\ExpressCheckout\ComputopPayPalExpressCompleteHandlerInterface
336
     */
337
    public function createComputopPayPalExpressCompleteHandler(): ComputopPayPalExpressCompleteHandlerInterface
338
    {
339
        return new ComputopPayPalExpressCompleteHandler(
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
357
    {
358
        return new ComputopEasyCreditPaymentHandler(
359
            $this->createInitEasyCreditConverter(),
360
            $this->getComputopClient(),
361
            $this->getCalculationClient()
362
        );
363
    }
364
365
    /**
366
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
367
     */
368
    public function createPaydirektPaymentHandler(): ComputopPrePostPaymentHandlerInterface
369
    {
370
        return new ComputopPaydirektPaymentHandler($this->createInitPaydirektConverter(), $this->getComputopClient());
371
    }
372
373
    /**
374
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
375
     */
376
    public function createSofortPaymentHandler(): ComputopPrePostPaymentHandlerInterface
377
    {
378
        return new ComputopSofortPaymentHandler($this->createInitSofortConverter(), $this->getComputopClient());
379
    }
380
381
    /**
382
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
383
     */
384
    public function createIdealPaymentHandler(): ComputopPrePostPaymentHandlerInterface
385
    {
386
        return new ComputopIdealPaymentHandler($this->createInitIdealConverter(), $this->getComputopClient());
387
    }
388
389
    /**
390
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
391
     */
392
    public function createInitCreditCardConverter(): ConverterInterface
393
    {
394
        return new InitCreditCardConverter($this->getComputopApiService(), $this->getConfig());
395
    }
396
397
    /**
398
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
399
     */
400
    public function createInitPayNowConverter(): ConverterInterface
401
    {
402
        return new InitPayNowConverter($this->getComputopApiService(), $this->getConfig());
403
    }
404
405
    /**
406
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
407
     */
408
    public function createInitPayPalConverter(): ConverterInterface
409
    {
410
        return new InitPayPalConverter($this->getComputopApiService(), $this->getConfig());
411
    }
412
413
    /**
414
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
415
     */
416
    public function createInitPayPalExpressConverter(): ConverterInterface
417
    {
418
        return new InitPayPalExpressConverter($this->getComputopApiService(), $this->getConfig());
419
    }
420
421
    /**
422
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
423
     */
424
    public function createInitDirectDebitConverter(): ConverterInterface
425
    {
426
        return new InitDirectDebitConverter($this->getComputopApiService(), $this->getConfig());
427
    }
428
429
    /**
430
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
431
     */
432
    public function createInitEasyCreditConverter(): ConverterInterface
433
    {
434
        return new InitEasyCreditConverter($this->getComputopApiService(), $this->getConfig());
435
    }
436
437
    /**
438
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
439
     */
440
    public function createInitPaydirektConverter(): ConverterInterface
441
    {
442
        return new InitPaydirektConverter($this->getComputopApiService(), $this->getConfig());
443
    }
444
445
    /**
446
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
447
     */
448
    public function createInitSofortConverter(): ConverterInterface
449
    {
450
        return new InitSofortConverter($this->getComputopApiService(), $this->getConfig());
451
    }
452
453
    /**
454
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
455
     */
456
    public function createInitIdealConverter(): ConverterInterface
457
    {
458
        return new InitIdealConverter($this->getComputopApiService(), $this->getConfig());
459
    }
460
461
    /**
462
     * @return \SprykerEco\Client\Computop\ComputopClientInterface
463
     */
464
    public function getComputopClient(): ComputopClientInterface
465
    {
466
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COMPUTOP);
467
    }
468
469
    /**
470
     * @return \SprykerEco\Yves\Computop\Dependency\ComputopToStoreInterface
471
     */
472
    public function getStore(): ComputopToStoreInterface
473
    {
474
        return $this->getProvidedDependency(ComputopDependencyProvider::STORE);
475
    }
476
477
    /**
478
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCalculationClientInterface
479
     */
480
    public function getCalculationClient(): ComputopToCalculationClientInterface
481
    {
482
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_CALCULATION);
483
    }
484
485
    /**
486
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToComputopApiClientInterface
487
     */
488
    protected function getComputopApiClient(): ComputopToComputopApiClientInterface
489
    {
490
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COMPUTOP_API);
491
    }
492
493
    /**
494
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
495
     */
496
    public function createOrderCreditCardMapper(): MapperInterface
497
    {
498
        return new CreditCardMapper(
499
            $this->getComputopApiService(),
500
            $this->getRouter(),
501
            $this->getStore(),
502
            $this->getConfig(),
503
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...rdMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

503
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
504
            $this->getUtilEncodingService(),
505
            $this->getCountryClient()
506
        );
507
    }
508
509
    /**
510
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
511
     */
512
    public function createOrderPayNowMapper(): MapperInterface
513
    {
514
        return new PayNowMapper(
515
            $this->getComputopApiService(),
516
            $this->getRouter(),
517
            $this->getStore(),
518
            $this->getConfig(),
519
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...owMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

519
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
520
            $this->getUtilEncodingService(),
521
            $this->getCountryClient()
522
        );
523
    }
524
525
    /**
526
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
527
     */
528
    public function createOrderPayPalMapper(): MapperInterface
529
    {
530
        return new PayPalMapper(
531
            $this->getComputopApiService(),
532
            $this->getRouter(),
533
            $this->getStore(),
534
            $this->getConfig(),
535
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...alMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

535
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
536
            $this->getUtilEncodingService(),
537
            $this->getCountryClient()
538
        );
539
    }
540
541
    /**
542
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
543
     */
544
    protected function createPayPalExpressMapper(): MapperInterface
545
    {
546
        return new PayPalExpressMapper(
547
            $this->getComputopApiService(),
548
            $this->getRouter(),
549
            $this->getStore(),
550
            $this->getConfig(),
551
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...ssMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

551
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
552
            $this->getUtilEncodingService(),
553
            $this->getCountryClient()
554
        );
555
    }
556
557
    /**
558
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
559
     */
560
    public function createOrderDirectDebitMapper(): MapperInterface
561
    {
562
        return new DirectDebitMapper(
563
            $this->getComputopApiService(),
564
            $this->getRouter(),
565
            $this->getStore(),
566
            $this->getConfig(),
567
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...itMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

567
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
568
            $this->getUtilEncodingService(),
569
            $this->getCountryClient()
570
        );
571
    }
572
573
    /**
574
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
575
     */
576
    public function createOrderSofortMapper(): MapperInterface
577
    {
578
        return new SofortMapper(
579
            $this->getComputopApiService(),
580
            $this->getRouter(),
581
            $this->getStore(),
582
            $this->getConfig(),
583
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...rtMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

583
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
584
            $this->getUtilEncodingService(),
585
            $this->getCountryClient()
586
        );
587
    }
588
589
    /**
590
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
591
     */
592
    public function createOrderPaydirektMapper(): MapperInterface
593
    {
594
        return new PaydirektMapper(
595
            $this->getComputopApiService(),
596
            $this->getRouter(),
597
            $this->getStore(),
598
            $this->getConfig(),
599
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...ktMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

599
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
600
            $this->getUtilEncodingService(),
601
            $this->getCountryClient()
602
        );
603
    }
604
605
    /**
606
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
607
     */
608
    public function createOrderIdealMapper(): MapperInterface
609
    {
610
        return new IdealMapper(
611
            $this->getComputopApiService(),
612
            $this->getRouter(),
613
            $this->getStore(),
614
            $this->getConfig(),
615
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...alMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

615
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
616
            $this->getUtilEncodingService(),
617
            $this->getCountryClient()
618
        );
619
    }
620
621
    /**
622
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
623
     */
624
    public function createOrderEasyCreditMapper(): MapperInterface
625
    {
626
        return new EasyCreditMapper(
627
            $this->getComputopApiService(),
628
            $this->getRouter(),
629
            $this->getStore(),
630
            $this->getConfig(),
631
            $this->getRequestStack()->getCurrentRequest(),
0 ignored issues
show
Bug introduced by
It seems like $this->getRequestStack()->getCurrentRequest() can also be of type null; however, parameter $request of SprykerEco\Yves\Computop...itMapper::__construct() does only seem to accept Symfony\Component\HttpFoundation\Request, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

631
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
632
            $this->getUtilEncodingService(),
633
            $this->getCountryClient()
634
        );
635
    }
636
637
    /**
638
     * @return \Spryker\Yves\Router\Router\RouterInterface
639
     */
640
    public function getRouter(): RouterInterface
641
    {
642
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_ROUTER);
643
    }
644
645
    /**
646
     * @return \Symfony\Component\HttpFoundation\RequestStack
647
     */
648
    public function getRequestStack(): RequestStack
649
    {
650
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_REQUEST_STACK);
651
    }
652
653
    /**
654
     * @return \SprykerEco\Yves\Computop\Dependency\Service\ComputopToUtilEncodingServiceInterface
655
     */
656
    public function getUtilEncodingService(): ComputopToUtilEncodingServiceInterface
657
    {
658
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_UTIL_ENCODING);
659
    }
660
661
    /**
662
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCountryClientInterface
663
     */
664
    public function getCountryClient(): ComputopToCountryClientInterface
665
    {
666
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COUNTRY);
667
    }
668
669
    /**
670
     * @return \SprykerEco\Yves\Computop\Mapper\Init\PrePlace\PayPalExpressToQuoteMapperInterface
671
     */
672
    protected function createPayPalExpressToQuoteMapper(): PayPalExpressToQuoteMapperInterface
673
    {
674
        return new PayPalExpressToQuoteMapper();
675
    }
676
}
677