Passed
Push — feature/eco-3653-handle-callba... ( a04ef8...b78799 )
by
unknown
05:21
created

createCreditCardFormDataProvider()   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
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 SprykerEco\Yves\Computop\Converter\InitCreditCardConverter;
13
use SprykerEco\Yves\Computop\Converter\InitDirectDebitConverter;
14
use SprykerEco\Yves\Computop\Converter\InitEasyCreditConverter;
15
use SprykerEco\Yves\Computop\Converter\InitIdealConverter;
16
use SprykerEco\Yves\Computop\Converter\InitPaydirektConverter;
17
use SprykerEco\Yves\Computop\Converter\InitPayNowConverter;
18
use SprykerEco\Yves\Computop\Converter\InitPayPalConverter;
19
use SprykerEco\Yves\Computop\Converter\InitPayuCeeSingleConverter;
20
use SprykerEco\Yves\Computop\Converter\InitSofortConverter;
21
use SprykerEco\Yves\Computop\Dependency\Client\ComputopToCountryClientInterface;
22
use SprykerEco\Yves\Computop\Dependency\Service\ComputopToUtilEncodingServiceInterface;
23
use SprykerEco\Yves\Computop\Form\CreditCardSubForm;
24
use SprykerEco\Yves\Computop\Form\DataProvider\CreditCardFormDataProvider;
25
use SprykerEco\Yves\Computop\Form\DataProvider\DirectDebitFormDataProvider;
26
use SprykerEco\Yves\Computop\Form\DataProvider\EasyCreditFormDataProvider;
27
use SprykerEco\Yves\Computop\Form\DataProvider\IdealFormDataProvider;
28
use SprykerEco\Yves\Computop\Form\DataProvider\PaydirektFormDataProvider;
29
use SprykerEco\Yves\Computop\Form\DataProvider\PayNowFormDataProvider;
30
use SprykerEco\Yves\Computop\Form\DataProvider\PayPalFormDataProvider;
31
use SprykerEco\Yves\Computop\Form\DataProvider\PayuCeeSingleFormDataProvider;
32
use SprykerEco\Yves\Computop\Form\DataProvider\SofortFormDataProvider;
33
use SprykerEco\Yves\Computop\Form\DirectDebitSubForm;
34
use SprykerEco\Yves\Computop\Form\EasyCreditSubForm;
35
use SprykerEco\Yves\Computop\Form\IdealSubForm;
36
use SprykerEco\Yves\Computop\Form\PaydirektSubForm;
37
use SprykerEco\Yves\Computop\Form\PayNowSubForm;
38
use SprykerEco\Yves\Computop\Form\PayPalSubForm;
39
use SprykerEco\Yves\Computop\Form\PayuCeeSingleSubForm;
40
use SprykerEco\Yves\Computop\Form\SofortSubForm;
41
use SprykerEco\Yves\Computop\Handler\ComputopPaymentHandler;
42
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopCreditCardPaymentHandler;
43
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopDirectDebitPaymentHandler;
44
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopEasyCreditPaymentHandler;
45
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopIdealPaymentHandler;
46
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPaydirektPaymentHandler;
47
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayNowPaymentHandler;
48
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayPalPaymentHandler;
49
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayuCeeSinglePaymentHandler;
50
use SprykerEco\Yves\Computop\Handler\PostPlace\ComputopSofortPaymentHandler;
51
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\CreditCardMapper;
52
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\DirectDebitMapper;
53
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\EasyCreditMapper;
54
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\IdealMapper;
55
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PaydirektMapper;
56
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayNowMapper;
57
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayPalMapper;
58
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayuCeeSingleMapper;
59
use SprykerEco\Yves\Computop\Mapper\Init\PostPlace\SofortMapper;
60
use Symfony\Component\HttpFoundation\RequestStack;
61
62
/**
63
 * @method \SprykerEco\Yves\Computop\ComputopConfig getConfig()
64
 * @method \SprykerEco\Client\Computop\ComputopClientInterface getClient()
65
 */
66
class ComputopFactory extends AbstractFactory
67
{
68
    /**
69
     * @return \SprykerEco\Yves\Computop\ComputopConfigInterface
70
     */
71
    public function getComputopConfig()
72
    {
73
        return $this->getConfig();
74
    }
75
76
    /**
77
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPaymentHandlerInterface
78
     */
79
    public function createComputopPaymentHandler()
80
    {
81
        return new ComputopPaymentHandler($this->getConfig());
82
    }
83
84
    /**
85
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
86
     */
87
    public function createCreditCardForm()
88
    {
89
        return new CreditCardSubForm();
90
    }
91
92
    /**
93
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
94
     */
95
    public function createPayNowForm()
96
    {
97
        return new PayNowSubForm();
98
    }
99
100
    /**
101
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
102
     */
103
    public function createPayPalForm()
104
    {
105
        return new PayPalSubForm();
106
    }
107
108
    /**
109
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
110
     */
111
    public function createSofortForm()
112
    {
113
        return new SofortSubForm();
114
    }
115
116
    /**
117
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
118
     */
119
    public function createDirectDebitForm()
120
    {
121
        return new DirectDebitSubForm();
122
    }
123
124
    /**
125
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
126
     */
127
    public function createPaydirektForm()
128
    {
129
        return new PaydirektSubForm();
130
    }
131
132
    /**
133
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
134
     */
135
    public function createIdealForm()
136
    {
137
        return new IdealSubForm();
138
    }
139
140
    /**
141
     * @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface
142
     */
143
    public function createEasyCreditForm()
144
    {
145
        return new EasyCreditSubForm();
146
    }
147
148
    /**
149
     * @return \SprykerEco\Yves\Computop\Form\PayuCeeSingleSubForm
150
     */
151
    public function createPayuCeeSingleSubForm(): PayuCeeSingleSubForm
152
    {
153
        return new PayuCeeSingleSubForm();
154
    }
155
156
    /**
157
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
158
     */
159
    public function createCreditCardFormDataProvider()
160
    {
161
        return new CreditCardFormDataProvider($this->getQuoteClient(), $this->createOrderCreditCardMapper());
162
    }
163
164
    /**
165
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
166
     */
167
    public function createPayNowFormDataProvider()
168
    {
169
        return new PayNowFormDataProvider($this->getQuoteClient(), $this->createOrderPayNowMapper());
170
    }
171
172
    /**
173
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
174
     */
175
    public function createPayPalFormDataProvider()
176
    {
177
        return new PayPalFormDataProvider($this->getQuoteClient(), $this->createOrderPayPalMapper());
178
    }
179
180
    /**
181
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
182
     */
183
    public function createSofortFormDataProvider()
184
    {
185
        return new SofortFormDataProvider($this->getQuoteClient(), $this->createOrderSofortMapper());
186
    }
187
188
    /**
189
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
190
     */
191
    public function createDirectDebitFormDataProvider()
192
    {
193
        return new DirectDebitFormDataProvider($this->getQuoteClient(), $this->createOrderDirectDebitMapper());
194
    }
195
196
    /**
197
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
198
     */
199
    public function createPaydirektFormDataProvider()
200
    {
201
        return new PaydirektFormDataProvider($this->getQuoteClient(), $this->createOrderPaydirektMapper());
202
    }
203
204
    /**
205
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
206
     */
207
    public function createIdealFormDataProvider()
208
    {
209
        return new IdealFormDataProvider($this->getQuoteClient(), $this->createOrderIdealMapper());
210
    }
211
212
    /**
213
     * @return \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface
214
     */
215
    public function createEasyCreditFormDataProvider()
216
    {
217
        return new EasyCreditFormDataProvider($this->getQuoteClient(), $this->createOrderEasyCreditMapper());
218
    }
219
220
    /**
221
     * @return \SprykerEco\Yves\Computop\Form\DataProvider\PayuCeeSingleFormDataProvider
222
     */
223
    public function createPayuCeeSingleFormDataProvider(): PayuCeeSingleFormDataProvider
224
    {
225
        return new PayuCeeSingleFormDataProvider($this->getQuoteClient(), $this->createOrderPayuCeeSingleMapper());
226
    }
227
228
    /**
229
     * @return \SprykerEco\Service\ComputopApi\ComputopApiServiceInterface
230
     */
231
    public function getComputopApiService()
232
    {
233
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_COMPUTOP_API);
234
    }
235
236
    /**
237
     * @return \Symfony\Component\HttpKernel\HttpKernelInterface
238
     */
239
    public function getApplication()
240
    {
241
        return $this->getProvidedDependency(ComputopDependencyProvider::PLUGIN_APPLICATION);
242
    }
243
244
    /**
245
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToQuoteClientInterface
246
     */
247
    public function getQuoteClient()
248
    {
249
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_QUOTE);
250
    }
251
252
    /**
253
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
254
     */
255
    public function createCreditCardPaymentHandler()
256
    {
257
        return new ComputopCreditCardPaymentHandler($this->createInitCreditCardConverter(), $this->getComputopClient());
258
    }
259
260
    /**
261
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
262
     */
263
    public function createPayNowPaymentHandler()
264
    {
265
        return new ComputopPayNowPaymentHandler($this->createInitPayNowConverter(), $this->getComputopClient());
266
    }
267
268
    /**
269
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
270
     */
271
    public function createPayPalPaymentHandler()
272
    {
273
        return new ComputopPayPalPaymentHandler($this->createInitPayPalConverter(), $this->getComputopClient());
274
    }
275
276
    /**
277
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
278
     */
279
    public function createDirectDebitPaymentHandler()
280
    {
281
        return new ComputopDirectDebitPaymentHandler($this->createInitDirectDebitConverter(), $this->getComputopClient());
282
    }
283
284
    /**
285
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
286
     */
287
    public function createEasyCreditPaymentHandler()
288
    {
289
        return new ComputopEasyCreditPaymentHandler(
290
            $this->createInitEasyCreditConverter(),
291
            $this->getComputopClient(),
292
            $this->getCalculationClient()
293
        );
294
    }
295
296
    /**
297
     * @return \SprykerEco\Yves\Computop\Handler\PostPlace\ComputopPayuCeeSinglePaymentHandler
298
     */
299
    public function createPayuCeeSinglePaymentHandler(): ComputopPayuCeeSinglePaymentHandler
300
    {
301
        return new ComputopPayuCeeSinglePaymentHandler(
302
            $this->createInitPayuCeeSingleConverter(),
303
            $this->getComputopClient()
304
        );
305
    }
306
307
    /**
308
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
309
     */
310
    public function createPaydirektPaymentHandler()
311
    {
312
        return new ComputopPaydirektPaymentHandler($this->createInitPaydirektConverter(), $this->getComputopClient());
313
    }
314
315
    /**
316
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
317
     */
318
    public function createSofortPaymentHandler()
319
    {
320
        return new ComputopSofortPaymentHandler($this->createInitSofortConverter(), $this->getComputopClient());
321
    }
322
323
    /**
324
     * @return \SprykerEco\Yves\Computop\Handler\ComputopPrePostPaymentHandlerInterface
325
     */
326
    public function createIdealPaymentHandler()
327
    {
328
        return new ComputopIdealPaymentHandler($this->createInitIdealConverter(), $this->getComputopClient());
329
    }
330
331
    /**
332
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
333
     */
334
    protected function createInitCreditCardConverter()
335
    {
336
        return new InitCreditCardConverter($this->getComputopApiService(), $this->getConfig());
337
    }
338
339
    /**
340
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
341
     */
342
    protected function createInitPayNowConverter()
343
    {
344
        return new InitPayNowConverter($this->getComputopApiService(), $this->getConfig());
345
    }
346
347
    /**
348
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
349
     */
350
    protected function createInitPayPalConverter()
351
    {
352
        return new InitPayPalConverter($this->getComputopApiService(), $this->getConfig());
353
    }
354
355
    /**
356
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
357
     */
358
    protected function createInitDirectDebitConverter()
359
    {
360
        return new InitDirectDebitConverter($this->getComputopApiService(), $this->getConfig());
361
    }
362
363
    /**
364
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
365
     */
366
    protected function createInitEasyCreditConverter()
367
    {
368
        return new InitEasyCreditConverter($this->getComputopApiService(), $this->getConfig());
369
    }
370
371
    /**
372
     * @return \SprykerEco\Yves\Computop\Converter\InitPayuCeeSingleConverter
373
     */
374
    protected function createInitPayuCeeSingleConverter(): InitPayuCeeSingleConverter
375
    {
376
        return new InitPayuCeeSingleConverter($this->getComputopApiService(), $this->getConfig());
377
    }
378
379
    /**
380
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
381
     */
382
    protected function createInitPaydirektConverter()
383
    {
384
        return new InitPaydirektConverter($this->getComputopApiService(), $this->getConfig());
385
    }
386
387
    /**
388
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
389
     */
390
    protected function createInitSofortConverter()
391
    {
392
        return new InitSofortConverter($this->getComputopApiService(), $this->getConfig());
393
    }
394
395
    /**
396
     * @return \SprykerEco\Yves\Computop\Converter\ConverterInterface
397
     */
398
    protected function createInitIdealConverter()
399
    {
400
        return new InitIdealConverter($this->getComputopApiService(), $this->getConfig());
401
    }
402
403
    /**
404
     * @return \SprykerEco\Client\Computop\ComputopClientInterface
405
     */
406
    protected function getComputopClient()
407
    {
408
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COMPUTOP);
409
    }
410
411
    /**
412
     * @return \SprykerEco\Yves\Computop\Dependency\ComputopToStoreInterface
413
     */
414
    protected function getStore()
415
    {
416
        return $this->getProvidedDependency(ComputopDependencyProvider::STORE);
417
    }
418
419
    /**
420
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCalculationClientInterface
421
     */
422
    protected function getCalculationClient()
423
    {
424
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_CALCULATION);
425
    }
426
427
    /**
428
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
429
     */
430
    protected function createOrderCreditCardMapper()
431
    {
432
        return new CreditCardMapper(
433
            $this->getComputopApiService(),
434
            $this->getRouter(),
435
            $this->getStore(),
436
            $this->getConfig(),
437
            $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

437
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
438
            $this->getUtilEncodingService(),
439
            $this->getCountryClient()
440
        );
441
    }
442
443
    /**
444
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
445
     */
446
    protected function createOrderPayNowMapper()
447
    {
448
        return new PayNowMapper(
449
            $this->getComputopApiService(),
450
            $this->getRouter(),
451
            $this->getStore(),
452
            $this->getConfig(),
453
            $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

453
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
454
            $this->getUtilEncodingService(),
455
            $this->getCountryClient()
456
        );
457
    }
458
459
    /**
460
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
461
     */
462
    protected function createOrderPayPalMapper()
463
    {
464
        return new PayPalMapper(
465
            $this->getComputopApiService(),
466
            $this->getRouter(),
467
            $this->getStore(),
468
            $this->getConfig(),
469
            $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

469
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
470
            $this->getUtilEncodingService(),
471
            $this->getCountryClient()
472
        );
473
    }
474
475
    /**
476
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
477
     */
478
    protected function createOrderDirectDebitMapper()
479
    {
480
        return new DirectDebitMapper(
481
            $this->getComputopApiService(),
482
            $this->getRouter(),
483
            $this->getStore(),
484
            $this->getConfig(),
485
            $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

485
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
486
            $this->getUtilEncodingService(),
487
            $this->getCountryClient()
488
        );
489
    }
490
491
    /**
492
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
493
     */
494
    protected function createOrderSofortMapper()
495
    {
496
        return new SofortMapper(
497
            $this->getComputopApiService(),
498
            $this->getRouter(),
499
            $this->getStore(),
500
            $this->getConfig(),
501
            $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

501
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
502
            $this->getUtilEncodingService(),
503
            $this->getCountryClient()
504
        );
505
    }
506
507
    /**
508
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
509
     */
510
    protected function createOrderPaydirektMapper()
511
    {
512
        return new PaydirektMapper(
513
            $this->getComputopApiService(),
514
            $this->getRouter(),
515
            $this->getStore(),
516
            $this->getConfig(),
517
            $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

517
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
518
            $this->getUtilEncodingService(),
519
            $this->getCountryClient()
520
        );
521
    }
522
523
    /**
524
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
525
     */
526
    protected function createOrderIdealMapper()
527
    {
528
        return new IdealMapper(
529
            $this->getComputopApiService(),
530
            $this->getRouter(),
531
            $this->getStore(),
532
            $this->getConfig(),
533
            $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

533
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
534
            $this->getUtilEncodingService(),
535
            $this->getCountryClient()
536
        );
537
    }
538
539
    /**
540
     * @return \SprykerEco\Yves\Computop\Mapper\Init\MapperInterface
541
     */
542
    protected function createOrderEasyCreditMapper()
543
    {
544
        return new EasyCreditMapper(
545
            $this->getComputopApiService(),
546
            $this->getRouter(),
547
            $this->getStore(),
548
            $this->getConfig(),
549
            $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

549
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
550
            $this->getUtilEncodingService(),
551
            $this->getCountryClient()
552
        );
553
    }
554
555
    /**
556
     * @return \SprykerEco\Yves\Computop\Mapper\Init\PostPlace\PayuCeeSingleMapper
557
     */
558
    protected function createOrderPayuCeeSingleMapper(): PayuCeeSingleMapper
559
    {
560
        return new PayuCeeSingleMapper(
561
            $this->getComputopApiService(),
562
            $this->getRouter(),
563
            $this->getStore(),
564
            $this->getConfig(),
565
            $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...leMapper::__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

565
            /** @scrutinizer ignore-type */ $this->getRequestStack()->getCurrentRequest(),
Loading history...
566
            $this->getUtilEncodingService(),
567
            $this->getCountryClient()
568
        );
569
    }
570
571
    /**
572
     * @return \Spryker\Yves\Router\Router\RouterInterface
573
     */
574
    public function getRouter(): RouterInterface
575
    {
576
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_ROUTER);
577
    }
578
579
    /**
580
     * @return \Symfony\Component\HttpFoundation\RequestStack
581
     */
582
    public function getRequestStack(): RequestStack
583
    {
584
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_REQUEST_STACK);
585
    }
586
587
    /**
588
     * @return \SprykerEco\Yves\Computop\Dependency\Service\ComputopToUtilEncodingServiceInterface
589
     */
590
    public function getUtilEncodingService(): ComputopToUtilEncodingServiceInterface
591
    {
592
        return $this->getProvidedDependency(ComputopDependencyProvider::SERVICE_UTIL_ENCODING);
593
    }
594
595
    /**
596
     * @return \SprykerEco\Yves\Computop\Dependency\Client\ComputopToCountryClientInterface
597
     */
598
    public function getCountryClient(): ComputopToCountryClientInterface
599
    {
600
        return $this->getProvidedDependency(ComputopDependencyProvider::CLIENT_COUNTRY);
601
    }
602
}
603