Test Setup Failed
Pull Request — master (#21)
by Aleksey
12:17
created

createBancontactOnlineTransferSubFormDataProvider()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
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\Payone;
9
10
use Spryker\Yves\Kernel\AbstractFactory;
11
use SprykerEco\Yves\Payone\Form\BancontactOnlineTransferSubForm;
12
use SprykerEco\Yves\Payone\Form\CreditCardSubForm;
13
use SprykerEco\Yves\Payone\Form\DataProvider\BancontactOnlineTransferDataProvider;
14
use SprykerEco\Yves\Payone\Form\DataProvider\CreditCardDataProvider;
15
use SprykerEco\Yves\Payone\Form\DataProvider\DirectDebitDataProvider;
16
use SprykerEco\Yves\Payone\Form\DataProvider\EpsOnlineTransferDataProvider;
17
use SprykerEco\Yves\Payone\Form\DataProvider\EWalletDataProvider;
18
use SprykerEco\Yves\Payone\Form\DataProvider\GiropayOnlineTransferDataProvider;
19
use SprykerEco\Yves\Payone\Form\DataProvider\IdealOnlineTransferDataProvider;
20
use SprykerEco\Yves\Payone\Form\DataProvider\InstantOnlineTransferDataProvider;
21
use SprykerEco\Yves\Payone\Form\DataProvider\InvoiceDataProvider;
22
use SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceCardOnlineTransferDataProvider;
23
use SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceEfinanceOnlineTransferDataProvider;
24
use SprykerEco\Yves\Payone\Form\DataProvider\PrePaymentDataProvider;
25
use SprykerEco\Yves\Payone\Form\DataProvider\Przelewy24OnlineTransferDataProvider;
26
use SprykerEco\Yves\Payone\Form\DirectDebitSubForm;
27
use SprykerEco\Yves\Payone\Form\EpsOnlineTransferSubForm;
28
use SprykerEco\Yves\Payone\Form\EWalletSubForm;
29
use SprykerEco\Yves\Payone\Form\GiropayOnlineTransferSubForm;
30
use SprykerEco\Yves\Payone\Form\IdealOnlineTransferSubForm;
31
use SprykerEco\Yves\Payone\Form\InstantOnlineTransferSubForm;
32
use SprykerEco\Yves\Payone\Form\InvoiceSubForm;
33
use SprykerEco\Yves\Payone\Form\PostfinanceCardOnlineTransferSubForm;
34
use SprykerEco\Yves\Payone\Form\PostfinanceEfinanceOnlineTransferSubForm;
35
use SprykerEco\Yves\Payone\Form\PrePaymentForm;
36
use SprykerEco\Yves\Payone\Form\Przelewy24OnlineTransferSubForm;
37
use SprykerEco\Yves\Payone\Handler\ExpressCheckout\QuoteHydrator;
38
use SprykerEco\Yves\Payone\Handler\ExpressCheckoutHandler;
39
use SprykerEco\Yves\Payone\Handler\PayoneHandler;
40
use SprykerEco\Yves\Payone\Plugin\PayoneCreditCardSubFormPlugin;
41
use SprykerEco\Yves\Payone\Plugin\PayonePrePaymentSubFormPlugin;
42
43
/**
44
 * @method \SprykerEco\Yves\Payone\PayoneConfig getConfig()
45
 */
46
class PayoneFactory extends AbstractFactory
47
{
48
    /**
49
     * @return \SprykerEco\Yves\Payone\Form\PrePaymentForm
50
     */
51
    public function createPrePaymentForm()
52
    {
53
        return new PrePaymentForm();
54
    }
55
56
    /**
57
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\PrePaymentDataProvider
58
     */
59
    public function createPrePaymentFormDataProvider()
60
    {
61
        return new PrePaymentDataProvider();
62
    }
63
64
    /**
65
     * @return \SprykerEco\Yves\Payone\Form\InvoiceSubForm
66
     */
67
    public function createInvoiceSubForm()
68
    {
69
        return new InvoiceSubForm();
70
    }
71
72
    /**
73
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\InvoiceDataProvider
74
     */
75
    public function createInvoiceSubFormDataProvider()
76
    {
77
        return new InvoiceDataProvider();
78
    }
79
80
    /**
81
     * @return \SprykerEco\Yves\Payone\Handler\PayoneHandler
82
     */
83
    public function createPayoneHandler()
84
    {
85
        return new PayoneHandler();
86
    }
87
88
    /**
89
     * @return \SprykerEco\Yves\Payone\Handler\ExpressCheckoutHandler
90
     */
91
    public function createExpressCheckoutHandler()
92
    {
93
        return new ExpressCheckoutHandler(
94
            $this->getPayoneClient(),
95
            $this->getCartClient(),
96
            $this->createQuoteHydrator(),
97
            $this->getConfig()
98
        );
99
    }
100
101
    /**
102
     * @return \SprykerEco\Yves\Payone\Plugin\PayonePrePaymentSubFormPlugin
103
     */
104
    public function createPrePaymentSubFormPlugin()
105
    {
106
        return new PayonePrePaymentSubFormPlugin();
107
    }
108
109
    /**
110
     * @return \SprykerEco\Yves\Payone\Plugin\PayoneCreditCardSubFormPlugin
111
     */
112
    public function createCreditCardSubFormPlugin()
113
    {
114
        return new PayoneCreditCardSubFormPlugin();
115
    }
116
117
    /**
118
     * @return \SprykerEco\Yves\Payone\Form\CreditCardSubForm
119
     */
120
    public function createCreditCardSubForm()
121
    {
122
        return new CreditCardSubForm();
123
    }
124
125
    /**
126
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\CreditCardDataProvider
127
     */
128
    public function createCreditCardSubFormDataProvider()
129
    {
130
        return new CreditCardDataProvider();
131
    }
132
133
    /**
134
     * @return \SprykerEco\Yves\Payone\Form\EWalletSubForm
135
     */
136
    public function createEWalletSubForm()
137
    {
138
        return new EWalletSubForm();
139
    }
140
141
    /**
142
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\EWalletDataProvider
143
     */
144
    public function createEWalletSubFormDataProvider()
145
    {
146
        return new EWalletDataProvider();
147
    }
148
149
    /**
150
     * @return \SprykerEco\Yves\Payone\Form\DirectDebitSubForm
151
     */
152
    public function createDirectDebitSubForm()
153
    {
154
        return new DirectDebitSubForm();
155
    }
156
157
    /**
158
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\DirectDebitDataProvider
159
     */
160
    public function createDirectDebitSubFormDataProvider()
161
    {
162
        return new DirectDebitDataProvider();
163
    }
164
165
    /**
166
     * @return \SprykerEco\Yves\Payone\Form\EpsOnlineTransferSubForm
167
     */
168
    public function createEpsOnlineTransferSubForm()
169
    {
170
        return new EpsOnlineTransferSubForm();
171
    }
172
173
    /**
174
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\EpsOnlineTransferDataProvider
175
     */
176
    public function createEpsOnlineTransferSubFormDataProvider()
177
    {
178
        return new EpsOnlineTransferDataProvider();
179
    }
180
181
    /**
182
     * @return \SprykerEco\Yves\Payone\Form\GiropayOnlineTransferSubForm
183
     */
184
    public function createGiropayOnlineTransferSubForm()
185
    {
186
        return new GiropayOnlineTransferSubForm();
187
    }
188
189
    /**
190
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\GiropayOnlineTransferDataProvider
191
     */
192
    public function createGiropayOnlineTransferSubFormDataProvider()
193
    {
194
        return new GiropayOnlineTransferDataProvider();
195
    }
196
197
    /**
198
     * @return \SprykerEco\Yves\Payone\Form\InstantOnlineTransferSubForm
199
     */
200
    public function createInstantOnlineTransferSubForm()
201
    {
202
        return new InstantOnlineTransferSubForm();
203
    }
204
205
    /**
206
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\InstantOnlineTransferDataProvider
207
     */
208
    public function createInstantOnlineTransferSubFormDataProvider()
209
    {
210
        return new InstantOnlineTransferDataProvider();
211
    }
212
213
    /**
214
     * @return \SprykerEco\Yves\Payone\Form\IdealOnlineTransferSubForm
215
     */
216
    public function createIdealOnlineTransferSubForm()
217
    {
218
        return new IdealOnlineTransferSubForm();
219
    }
220
221
    /**
222
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\IdealOnlineTransferDataProvider
223
     */
224
    public function createIdealOnlineTransferSubFormDataProvider()
225
    {
226
        return new IdealOnlineTransferDataProvider();
227
    }
228
229
    /**
230
     * @return \SprykerEco\Yves\Payone\Form\PostfinanceEfinanceOnlineTransferSubForm
231
     */
232
    public function createPostfinanceEfinanceOnlineTransferSubForm()
233
    {
234
        return new PostfinanceEfinanceOnlineTransferSubForm();
235
    }
236
237
    /**
238
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceEfinanceOnlineTransferDataProvider
239
     */
240
    public function createPostfinanceEfinanceOnlineTransferSubFormDataProvider()
241
    {
242
        return new PostfinanceEfinanceOnlineTransferDataProvider();
243
    }
244
245
    /**
246
     * @return \SprykerEco\Yves\Payone\Form\PostfinanceCardOnlineTransferSubForm
247
     */
248
    public function createPostfinanceCardOnlineTransferSubForm()
249
    {
250
        return new PostfinanceCardOnlineTransferSubForm();
251
    }
252
253
    /**
254
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceCardOnlineTransferDataProvider
255
     */
256
    public function createPostfinanceCardOnlineTransferSubFormDataProvider()
257
    {
258
        return new PostfinanceCardOnlineTransferDataProvider();
259
    }
260
261
    /**
262
     * @return \SprykerEco\Yves\Payone\Form\PostfinanceCardOnlineTransferSubForm
263
     */
264
    public function createPrzelewy24OnlineTransferSubForm()
265
    {
266
        return new Przelewy24OnlineTransferSubForm();
267
    }
268
269
    /**
270
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\PostfinanceCardOnlineTransferDataProvider
271
     */
272
    public function createPrzelewy24OnlineTransferSubFormDataProvider()
273
    {
274
        return new Przelewy24OnlineTransferDataProvider();
275
    }
276
277
    /**
278
     * @return \SprykerEco\Yves\Payone\Form\BancontactOnlineTransferSubForm
279
     */
280
    public function createBancontactOnlineTransferSubForm(): BancontactOnlineTransferSubForm
281
    {
282
        return new BancontactOnlineTransferSubForm();
283
    }
284
285
    /**
286
     * @return \SprykerEco\Yves\Payone\Form\DataProvider\BancontactOnlineTransferDataProvider
287
     */
288
    public function createBancontactOnlineTransferSubFormDataProvider(): BancontactOnlineTransferDataProvider
289
    {
290
        return new BancontactOnlineTransferDataProvider();
291
    }
292
293
    /**
294
     * @return \SprykerEco\Client\Payone\PayoneClientInterface
295
     */
296
    public function getPayoneClient()
297
    {
298
        return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_PAYONE);
299
    }
300
301
    /**
302
     * @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCartInterface
303
     */
304
    public function getCartClient()
305
    {
306
        return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CART);
307
    }
308
309
    /**
310
     * @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCustomerInterface
311
     */
312
    public function getCustomerClient()
313
    {
314
        return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CUSTOMER);
315
    }
316
317
    /**
318
     * @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToShipmentInterface
319
     */
320
    public function getShipmentClient()
321
    {
322
        return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_SHIPMENT);
323
    }
324
325
    /**
326
     * @return \SprykerEco\Yves\Payone\Dependency\Client\PayoneToCalculationInterface
327
     */
328
    public function getCalculationClient()
329
    {
330
        return $this->getProvidedDependency(PayoneDependencyProvider::CLIENT_CALCULATION);
331
    }
332
333
    /**
334
     * @return \SprykerEco\Yves\Payone\Handler\ExpressCheckout\QuoteHydrator
335
     */
336
    public function createQuoteHydrator()
337
    {
338
        return new QuoteHydrator(
339
            $this->getShipmentClient(),
340
            $this->getCustomerClient(),
341
            $this->getCalculationClient()
342
        );
343
    }
344
}
345